Click here to Skip to main content
15,910,083 members
Everything / Mobile Apps / Android / Android4

Android4

Android4x

Great Reads

by Andy Point
Android Download Manager Tutorial: How to download files using Download Manager from the Internet
by Grasshopper.iics
Learn to build an App from Scratch to facilitate understanding of Android Resources with a real case study
by cigwork
A general purpose file save popup for Android.
by Andy Point
Google Maps Nearby Places API Hello Guys. Hope all of you are doing well. In this tutorial, we will learn how to add the markers on nearby places in Google Maps API using Retrofit . We will name this App as Google Maps Nearby Places API.

Latest Articles

by hexgear
Hi all as I stared my development with android I always wanted to create a Custom view . To learn about canvas I decided to create matrix rain effect which I can add to my android layout. Here is the complete tutorial which I have post I posted it at my blog http://www.androidlearner.com/
by Andy Point
Google Maps Nearby Places API Hello Guys. Hope all of you are doing well. In this tutorial, we will learn how to add the markers on nearby places in Google Maps API using Retrofit . We will name this App as Google Maps Nearby Places API.
by Andy Point
Today Almost all web and mobile apps come with Google and Facebook Login, This is a really useful feature for both the app developer and the user, since almost everybody tend to have a google/gmail and facebook account and moreover while logging in with google you don’t need to remember your UserId
by Andy Point
Android Download Manager Tutorial: How to download files using Download Manager from the Internet

All Articles

Sort by Score

Android4 

23 Sep 2014 by Imran_Hasan
Add these permissions in AndroidManifest.xml inside manifest tag
27 Dec 2014 by ridoy
You have multiple ways to do that.First way is to poll the server to ask for update. This solution isn't really efficient and lot of params are had to choose: Time to update-> will affect battery and re-activity.Second way is to use Google Cloud Messaging(GCM). It provides a solution to...
6 Jan 2015 by ridoy
It's as simple to change your activity name in your Manifest.xml. android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > ...
22 Feb 2015 by Kornfeld Eliyahu Peter
Xamarin - grown from MonoDevelop - is a development environment to address multi-platform (Andriod, iOS, WindowsPhone) development in C#/.NET...Check here: http://xamarin.com/[^]
17 Jul 2016 by Andy Point
Android Download Manager Tutorial: How to download files using Download Manager from the Internet
5 Jun 2017 by David Crow
Starting a process and then blocking all other processes waiting on a result is not the way mobile devices (smartphones, tablets) are meant to be used. It's the wrong UX. If the main thread (also called the UI thread) spawns another thread to do some work, the main thread needs to keep right...
23 May 2018 by JesalMithani
Hello, There are plenty of outdated tutorial are there on internet. Here I have recently found a latest android google login tutorial for one of my trainee. You will need to make app in google developer console first. Then give your app's package name and SHA-1 to google developer console and...
24 Jan 2014 by OriginalGriff
Well good luck.You won't get it here.We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial...
26 Feb 2014 by JebaSuthan C
I have an Android phone with 2 SIM card and I want to send sms using Sim1 or Sim2.By default the message is sent from sim1. But i want to send sms from sim2. Is it possible to setting to send sms using Sim1 or Sim2?It would be great if there is an setting options to send sms using Sim1 or...
24 Oct 2014 by Peter Leow
it should beLinearLayout
5 Nov 2014 by MrGeek404
Look at this Detecting incoming and outgoing phone calls on Android[^] please
18 Nov 2014 by Peter Leow
Refer:1. Payment Gateway Integration Through PayPal[^]2. Judo Payment Setup[^]
23 Nov 2014 by seyed mahmud shahrokni
Hi developers ! i made a website & this website (asp.net + sql server 2008 ) is about small business . it gives you some informations about some products . now i'd like to make a mobile application ( android ) to extend my business . i want to read and manipulate data with this app . ...
23 Nov 2014 by Manas Bhardwaj
Here are my two cents:You don't want to have a connectivity to SQL Server from your Android App. Infact, SQL Server should not be known to your App at all.Instead, introduce if you don't have already some sort of web or REST service (read as Web API) which can do the basic CRUD...
14 Dec 2014 by Richard MacCutchan
while(in.readLine()!=null) { line=line+in.readLine().toString(); LineCounter++;}You read a line (in the while statement), but you do not save it anywhere. Then you read the next line and add it to your variable. Then you go back and read another line which you ignore,...
29 Dec 2014 by ridoy
You can check it:Downloading video file from Mysql DB in java[^]
2 Jan 2015 by Richard MacCutchan
See http://developer.android.com/guide/practices/screens_support.html[^].
4 Jan 2015 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
You can't create. As the name "service" suggests, it would serve you something. You provide some input and ask for some output. That's it. It can't control the UI.
11 Jan 2015 by Richard MacCutchan
See https://developer.android.com/reference/android/content/res/AssetManager.html[^].
22 Jan 2015 by RupeshMote
Hey vinod, I have successfully downloaded android os source code for master branch.See this link and do all procedure described in it : https://source.android.com/source/building.html[^]The size of master branch source code is 31.5 GBI think in your case the problem is, your source...
22 Feb 2015 by Sergey Alexandrovich Kryukov
Xamarin provides the solution, but their pricing and licensing is just disturbing.Microsoft promises to provide it all free of charge with much better support in future Visual Studio 2015, but we know little detail. For now, Xamarin is supported by Visual Studio 2013.I can tell you one...
19 Mar 2015 by Afzaal Ahmad Zeeshan
I believe the problem is with the RAM of your mobile phone, the stack trace shows this error popping out first (in your stack trace) and then causing the troubles for custom view not being inflated.Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budgetWhich shows, that you...
31 Mar 2015 by Avinash6474
Hi All,I had created an application using phonegap. I had added geolocation plugin in application cordova plugin add org.apache.cordova.geolocationI can able to see the plug in added in project. Now I have created a location.html page in which I am using geolocation plugin...
7 Apr 2015 by CHill60
You need to include the AND within the selection criteria (the AND is SQLite not part of the Cursor construction).Try the following instead (helper.TX_ID + "='" + name + "' AND " + helper.TX_DATE + "='" + td + "'"), You may also find the following article of interest A Simple Android SQLite...
18 Jun 2015 by OriginalGriff
You can't really do that: it's like saying "I want to record the sound in a cinema, but only that from the screen - ignore the people around me".It can be done - if you have the song recorded already, so you can use it to "filter out" the other sounds - but this sounds like you don't have...
6 Oct 2015 by Krunal Rohit
You can use Bundle (or SharedPreferences for that matter).See this: http://stackoverflow.com/questions/17252236/how-to-persist-fragment-data-after-backstack-transactions[^]-KR
15 Oct 2015 by Afzaal Ahmad Zeeshan
Android is still based on Java language, so the exceptions generally are Java-themed problems in your applications. The "Index out of bounds" means that you are trying to reference an element that is not available inside the current collection. Have a look at the exception itself, Index...
8 Jan 2016 by Richard MacCutchan
I would really recommend some of the articles at http://www.codeproject.com/KB/android/#Android+Tutorial+Contest[^], especially those written by Peter Leow - Professional Profile - CodeProject[^].
1 Feb 2016 by Dave Kreskowiak
Well, first you have to contact Pandora and apply to become a developer partner. I would assume that it's not free. After that, you get all the goodies to allow you to write code against their API.
5 Sep 2016 by OriginalGriff
That's going to depend on what you already know!If you know Java, then look at starting with Android Studio: Download Android Studio and SDK Tools | Android Studio[^]If you know C#, then it may be worth looking at Xamarin, now it's free and part of Visual Studio 2015.But...if you are...
5 Sep 2016 by Richard MacCutchan
See Creating a Simple Hello World Android Project[^], and other articles at http://www.codeproject.com/KB/android/#Android+Tutorial+Contest[^] for Android learning.
21 Feb 2017 by OriginalGriff
We are not here to do your work for you: if you want that, you have to pay. I suggest that you go to Freelancer.com and ask there.But beware: you get what you pay for. Pay peanuts, get monkeys.
5 Jun 2017 by Afzaal Ahmad Zeeshan
Like already being mentioned, I would pay a great emphasis on the fact that intertwining your synchronous code, with asynchronous code is a bad and poor approach. The two should be left alone, and should work in their own contexts. What you are creating is useful, and really very much helpful...
1 Jul 2017 by Richard MacCutchan
You already asked this question at How to solve this error in android: java.lang.classcastexception: com.ex.lp.rv.root.secondpage.data.tvshow cannot be cast to com.google.android.gms.ads.nativeexpressadview[^]; please do not repost. And if you still do not understand casting, then you need to...
12 Oct 2017 by OriginalGriff
The curly braces there are to provide a default value for the new instance, and in this case are irrelevant as there is no initialization data in it so they can be omitted. They are often seen in lists, arrays, and so forth: List names = new List() { "John", "Mike", "Susan" };
21 May 2018 by Yesudass Moses
I have designed the below layout as per so many solutions provided by everywhere. I have set the android:windowSoftInputMode="adjustResize|stateVisible" in Manifest file too. Still I cannot get the linear layout image buttons above the soft keyboard. Can anybody point me what's wrong with this...
14 May 2018 by JesalMithani
In Manifest file add the below code for this activity If above method does not work then try this one android:windowSoftInputMode="stateVisible|adjustResize"
17 Aug 2018 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a method return value but it contains null - which...
17 Aug 2018 by Richard MacCutchan
This is the issue you need to fix first: 08-17 16:20:54.784 7570-7676/com.myfonetv.a3wc.myfonetv I/System.out: [CDS][DNS]Unable to resolve host "staging.streamhash.info": No address associated with hostname
23 Jul 2020 by Member 10627743
Hi android enthusiast, I hope the lockdown is not taking it's on you all, we will surely survive this pandemic I implemented firenase email/password authemtication in my app which is working well until I migrated my app androidx during test on...
1 Jul 2020 by OriginalGriff
Google is your friend: he can find things a lot faster than asking here. A very, very quick search gave me over 300,000 hits: java string expression evaluator - Google Search[^] most of which look like they contain complete solutions... In...
20 Jun 2023 by Richard MacCutchan
Looking at the C# code you have: public void StartSpeechRecognition() { AndroidJavaObject speechResultListener = new AndroidJavaObject("com.example.unityandroidplswork.STTPlugin$SpeechRecognitionResultListener", this); ...
28 Jun 2023 by Andre Oosthuizen
You can remove the 'Grid.Column' property from the Image and Labels, as it is not needed. Rather use 'HorizontalStackLayout' for the image and labels inside your 'ViewCell' to display your images with their original sizes. See the properties for...
5 Jan 2014 by Somanadh B
I am doing a project releated to livewallpaper, my app requirement is when the user Click the button camera preview set as wallpaper. i am doing all this stuff, but problem is after set the camera preview as wallpaper, when try to open the camera, it shows camera failed, i know we create only...
6 Jan 2014 by Xiao Ling
When you start another Activity, your previous Activity will be paused. The onPause() method will be triggered. so what you should do: @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); if (camera != null)...
7 Jan 2014 by Somanadh B
use the OnVisbilityChange() in Engine class to release the camera and start the camera.@Overridepublic void onVisibilityChanged(boolean visible) { // TODO Auto-generated method stub super.onVisibilityChanged(visible); if (visible) { try { //open the...
28 Jan 2014 by Tausif7099
My Android Application How to connect Facebook with android application Plz Help me...
6 Feb 2014 by Somanadh B
I am Developing an app, In this user can play multiple videos at a time in single layout file. For this i am using Video Views to play videos. my problem is user clicks save button the layout file was converted and saved as a video file into sdcard. If the user open saved file it plays multiple...
13 Feb 2014 by Prashant S Mane
0 down vote favorite I am new in android development.Now I am working in one existing android project . This application is working in android 2.3 but when I update android sdk to 4.4 it is not working properly. Here is one webservice GetCurrentConnectionString() for getting connection...
13 Feb 2014 by Pheonyx
I put that error message into google as I am not an Android developer and have no idea about the solution. This is the first link:Googles first result[^]In it there is an example of converting a method to be an AsyncTask along with a note that you must remember to add something to the...
25 Mar 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Here we answer specific questions which members face during programming.We can't work on the whole source code. You need to do that yourself.If you face any difficulty while coding, feel free to come back here and ask another question with specific issue describing the scenario. ...
6 May 2014 by Member 10800236
could anyone plz tell me how to use external java file in android project with existing layout?
13 May 2014 by Sudhakar Shinde
Please check this Tutorial for the requirement mentioned by you.
26 Jun 2014 by nika2008
Hi i am trying to connect android app with wcf service hosted in console win appin local network this is how i call it in the url how i call it "http://192.168.1.3:9000/T_service" when i wanna call method of this service http://192.168.1.3:9000/T_service/getData and gives me blank page.??? i...
11 Jul 2014 by Peter Leow
Your question is not appropriate for this quick answers forum. Here we answer specific programming questions, not about research or how to start a project etc. If you want info on tutorials or books, they are plenty online.
13 Jul 2014 by George Jonsson
I guess you can start on one of these siteshttp://www.mobilerechargeapi.com/[^]http://onlinerechargeapi.com/[^]
31 Jul 2014 by Member 10678436
I have Developing Application of Full Caller Id. In that dynamic screen call at the time of Incoming call / After Missed Call. Now this is work one time. When i received call. Than after it is not work or Not call any dynamic screen at the time Incoming call/ Missed call.I have very confuse...
2 Aug 2014 by Afzaal Ahmad Zeeshan
If you want to build a webite, then I guess you can do that using ASP.NET Web API. ASP.NET Web API has got a solution for your requirement and you can implement it to your Application too. You can develop the ASP.NET Web Site using MVC architect and then add the Web API. Android application...
6 Aug 2014 by Member 10845822
I have to develop an android application which have to get locked to a particular network, and automatically send the subscriber number as sms to another number. How can this be implemented?
15 Aug 2014 by solomon201
I am new to android. I am trying to set the background of my layout and keep getting an error. i have doubled checked but still having same problem. Below is my code. xmlns:tools="http://schemas.android.com/tools" android:id="@+id/mylayout" ...
15 Aug 2014 by Sandeep Londhe
Click This You Will Get better Idea to Set Layout Background
18 Aug 2014 by activex12
Hi,I need to develop an android app such that when it is activity it will block the android keyboard. so that the user cannot able to provide any inputs there by prevent them from sending text messages or chatting.Is it possible to block the keyboard like that. how to implement it. Please...
19 Aug 2014 by Xiao Ling
Keyboard shows when you click EditText. So you just need to disable the keyboard:EditText.setInputType(InputType.TYPE_NULL)
12 Sep 2014 by Krupal5
I am new to Andoid development and I have created a snippet for replacing fragments programetically.I followed the guide on android developers.I have create a method named `selectFrag` and fired it on button click: public void selectFrag(View view) { ...
15 Sep 2014 by seyed mahmud shahrokni
Hi ,I wrote a peace piece of code in Eclipse , but it didn't work.I wanted to show Contact list in my app, so I used this code.Intent i=new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("content://contacts"));startActivity(i);When I use this code I...
15 Sep 2014 by YRoger
Uri.parse("content://com.android.contacts/contacts")
23 Sep 2014 by seyed mahmud shahrokni
i want to get Avd's Width ( android virtual device )i use this code for my problem : Toast.makeText(this, String.valueOf(view.getWidth()), Toast.LENGTH_LONG);but Eclips shows me an error.view cannot be resolved ...should i import somthing else in my acction ? import...
23 Sep 2014 by seyed mahmud shahrokni
hi . i use Galexy nexus as an Avd ( android virtual device )i want to use 'Maps' in my app . here this is my code : Intent i=new Intent (android.content.Intent.ACTION_VIEW, Uri.parse("geo:37.827500,-122.481670")); ...
23 Sep 2014 by Sergey Alexandrovich Kryukov
Would you start from https://developers.google.com/maps/documentation/android[^]?—SA
23 Sep 2014 by Richard MacCutchan
see http://developer.android.com/guide/practices/compatibility.html[^].
9 Aug 2018 by Member 10970728
how to set a counter in asynctask in android 4?
9 Oct 2014 by Mehul Tank
hi everyone when ever insert a data in to data base no any data insert in data base and no any kind of error display ....how to solve this error ???log cat out put is...10-10 15:06:15.907: E/SQLiteDatabase(3279): Error inserting ename=amj emobileno=65 eid=6 eemail=knjfd...
18 Oct 2014 by Mehul Tank
hello ..i want use javascript for validation how to be done in android any one can me tell me about something how it is implement ???thanks....
20 Oct 2014 by Mehul Tank
hello everyone i have one text view in that set data dynamically means data fetch from the data base and set in format means row and column wise it is possible or not ??if yes tell me how ???tahnks..
23 Oct 2014 by Richard MacCutchan
See http://developer.android.com/index.html[^], and Creating a Simple Hello World Android Project[^].
30 Oct 2014 by Member 11122778
For an Example any income call reached my phone show the network operator or services Ex. Airtel,Vodefone,Docomo etc., pls answer me am new android developer any methods or code or document link give me
13 Nov 2014 by Gourav Sharma from Jammu
Hi all,I am using this code but it gives errors i am unable to trace.Any help would be appreciated.Here is the code:package com.example.test;import java.net.DatagramPacket;import java.net.DatagramSocket;import android.app.Activity;import android.os.Bundle;import...
13 Nov 2014 by Richard MacCutchan
The error messagedid not call through to super.onResume()tells you exactly what is wrong. See also http://developer.android.com/training/basics/activity-lifecycle/pausing.html[^].
16 Nov 2014 by Kathy Kefas
i had the same problem and i changed the following from the eclipse.ini--launcher.XXMaxPermSize256m -XX:MaxPermSize=256m-Xms512m-Xmx1024mi know you mentioned earlier that you changed it but i decided to write it anyway because you your Xms was 1024m. just give it a try
20 Nov 2014 by Richard MacCutchan
Take a look at https://www.google.com/search?q=usb+printer+to+the+android[^].
24 Nov 2014 by seyed mahmud shahrokni
i created an android virtual device (Nexus7 800*1280 tvdpi) in Eclipse but unfortunately it doesn't work !Error : Starting emulator for AVD 'mob2'Failed to allocate memory: 8This application has requested the Runtime to terminate it in an unusual way.Please contact the application's...
24 Nov 2014 by seyed mahmud shahrokni
hi guys . when i run my app i get an unusual Error in LogCatError opening trace file: No such file or directory (2)im trying to make a program to connect Internet i added this tag to Manifest File manifest : my java :...
24 Nov 2014 by Afzaal Ahmad Zeeshan
That problem is the issue related to your (virtual) device's RAM size, minimize it a little bit and it'll run. Read this question for more: http://stackoverflow.com/questions/7222906/failed-to-allocate-memory-8[^]
30 Nov 2014 by seyed mahmud shahrokni
hi Guys !im trying to make simple app to connect internet. but it doesn't work ! & i dont know why ?! i also searched Google to find Simple exampels but i didnt find anything usefull . please help me and fix my mistakes . tnx error: java.lang.NullPointerException: println needs...
30 Nov 2014 by Richard MacCutchan
java.lang.NullPointerExcepti...
30 Nov 2014 by Xiao Ling
Move your HTTP connection code to a worker thread. The network I/O will cause crash in UI thread (onCreate).
2 Dec 2014 by seyed mahmud shahrokni
I solved it mySelf ! package com.example.html5;import android.os.Bundle;import android.app.Activity;import android.view.Menu;import android.view.View;import java.net.URL;import java.net.URLConnection;import java.net.HttpURLConnection;import java.io.BufferedReader;import...
5 Dec 2014 by seyed mahmud shahrokni
Hi , i made a mobile application (android) to connect internet and Show informations about some products . when i use adress on the internet Like http://Google.com it works ok but if i change adress to http://localhost/mob1/Default.aspx it doesnt work !!java.net.ConnectException: failed...
7 Dec 2014 by seyed mahmud shahrokni
hi . im developing an application in android . this app connects to a web application and Returns data about some products ... For some reasons i need to connect LocalHost(IIS) . for this purpose I have to change LocalHost ip (127.0.0.1) to (10.0.2.2) ! But i dont know How ! I Use...
7 Dec 2014 by Zoltán Zörgő
You can't change local loopback from 127.0.0.1. It is defined in the RFC[^], it is part of the standard.I suppose, your "server" has DHCP. You simply need to have your original address AND your desired extra address (10.0.2.2). You can switch to static ip on your interface, and add both...
9 Dec 2014 by seyed mahmud shahrokni
Hello . i had a problem in my android application so i read an article . this article explains how can i solve my problem with some Commands . but the new problem is Where exactly i should use these Commands ? where is the Command Line ?i searched Google but i didnt finde...
9 Dec 2014 by Peter Leow
Refer: 1. Accessing the Command Prompt[^]2. Android/Eclipse: where to write command-lines like “emulator -”?[^]
10 Dec 2014 by Mehul Tank
Hello! When I fetch the data from data base error is occur named index out of bound.Query written by me is as follow: public Cursor getid(String nm2) { String qry = "SELECT Family_member,Activity FROM " + TABLE_NAME_FAMILY_DETAIL + " WHERE Family_member = '" + nm2 +"' " ; ...
29 Aug 2019 by seyed mahmud shahrokni
Hi , i made an android application . this application returns data from Web applications & it works very well . unfortunately if i Use my Local Host it doesnt Work ! it gives me an error Like this : java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 80): connect...
15 Dec 2014 by seyed mahmud shahrokni
hi guys im using AsyncTask class in my android project . can i create a new button in onProgressUpdate() method ?! i can find elements inside of this method but it seems i cant create a new one ! when i want to create a new one it says : the constructor Button...
15 Dec 2014 by Fredrik Bornander
Button takes a Context as it's constructor parameter (and possibly an AttributeSet and an int, but that's not important here), but you're passing something MMainActivityRetrieveFeedTask which I am guessing is not a Context.Try creating the button by passing in just your...
16 Dec 2014 by seyed mahmud shahrokni
hi . im developing an android application & also im using AsyncTask Class . as you know this class has some important methods 1-onPreExecute() 2-doInBackground(Params...)3-onPostExecute(Result)4-onProgressUpdate(Progress...)now i want to create a button dynamically in...
18 Dec 2014 by seyed mahmud shahrokni
hi guys . im developing an android application , i want to add some LinearLayout inside of ScrollView Layout dinamicly in android as Rows . but it says ScrollView can have only one Child !!! what should id do if i want add some elements like button or LinearLayout or anything to...
19 Dec 2014 by seyed mahmud shahrokni
hi . im developing an android application ,but i have a little problem . i want to make 10 buttons dynamically. if i set Button text directly it works and it creates 10 buttons very well. LinearLayout ll=(LinearLayout)findViewById(R.id.lil);for(int i=0 ;i