Posts by lucasb.aquino • 191 points
5 posts
-
2
votes2
answers14324
viewsA: Check whether the string is null or empty
When performing this verification in Strings, on Android always use the isEmpty() method of the Textutils class of Android. TextUtils.isEmpty(suaString);
-
1
votes1
answer668
viewsA: Detecting Volume Keystrokes Pressing on Android
Monitor with some kind of service? I see no other way than to use Alarmmanager to check the volume every x seconds. However, if you are in Activity, you can use this solution: public boolean…
-
1
votes3
answers1461
viewsA: How to update Textview from Asynctask?
What happens is that you are trying to update your View within the Ackground() method that runs on another thread and this is not allowed. You can update your View in the following Asynctask…
-
4
votes3
answers5690
viewsA: Catch latitude Android - Location == null
You can’t pick up the location so directly, take a look at the documentation: http://developer.android.com/training/location/retrieve-current.html The moment you are trying to get the location, the…
-
1
votes2
answers1222
viewsA: How to pass the application context to the Adapter by reading Json using Asynctask?
You can create a constructor that takes the context. Declare within your Getbusiness class the mContext property as below: private Context mContext; And then create a constructor by passing Context.…