Now, I want to tell you about how get GPS Android Device Information. Please notes that this function can be ran on class with activity extended. the code will be like this: GpsData gpsData = GpsData.getInstance(); LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); longitude = location.getLongitude(); latitude = location.getLatitude(); accuracy = location.getAccuracy(); altitude …
Category Archive: stupid
Mar 09
How to use getInstance() ?
getInstance is usually used to help to make just one object and without parse it. for example, we parse parameter Object like this: public class GpsData { VarData vardata; public GpsData(VarData data){ this.data = vardata; } } Nah, with that situation u MUST parse one by one class that use the target class. How hard …
Mar 09
How to Change UI inside of thread?
now, I want to let you know how to change UI inside of thread. You know, Android UI cannot be executed by the thread WITHOUT add an explain to execute the UI. because the Thread is the execution program that also run while the main process is run. It would be conflict if the Thread …
Mar 02
how to read a ‘strange class’
I just wonder how people know how to use the strange class. let’s make an example. This is the class I got from developer.android, I used Telephony Manager, but you know,,, the calling method is different. Class Overview Provides access to information about the telephony services on the device. Applications can use the methods in …
Recent Comments