I tried to read email from the emailprovider, but from StackOverflow I read that it’s impossible. The error also couldn’t be fix. java.lang.SecurityException: Permission Denial: reading com.android.email.provider.EmailProvider uri content://com.android.email.provider/account from pid=278, uid=10003 requires com.android.email.permission.ACCESS_PROVIDER here is the code Cursor c = null; Uri CONTENT_URI = Uri.parse(“content://com.android.email.provider/account”); String RECORD_ID = “_id”; String[] ID_PROJECTION = new String[] …
Category Archive: android
Mar 15
Get SMS from inbox/outbox
Now I want to show you how to show to the screen the SMS from your inbox/outbox. In this tutorial, you should permission to read sms first on your android manifest. This is the code, we use cursor to get the text. public void readSMS() { String info = “”; Uri mSmsinboxQueryUri = Uri.parse(“content://sms”); Cursor …
Mar 09
Get GPS Device Info
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 …
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 …
Mar 01
Show Android Device Info
Show device info is the basic to make a android interface application. Actually, you should know the data from Android device due to develop your application. For example, if you want to build memory manager application for Android, you must know the memory condition is, the heap size, the free size of memory, the applications …
Feb 29
JSON Java & PHP
I want to show you how to get the value of the variable from php to java using JSON. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate(wikipedia). First, you build your database and create a table. …
Recent Comments