E
E
emigrantdd2014-09-10 21:15:01
Java
emigrantdd, 2014-09-10 21:15:01

How can I execute the class I need in the service?

Good day. I'm doing a service and at this stage I need to get all possible "incoming" SMS that are stored on the phone, so I found this class, but after its execution, nothing is stored in the variables, but only these brackets "[]" I just I do not understand what is the problem? I think that most likely when the service is executed, the program displays these values, but since the class has not been executed, they are null. I call the class with

startService(new Intent(this,smsCall.class));

Who can tell what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2014-09-10
@itvdonsk

Does the application have access rights to read SMS?
Well, see if an exception is thrown or not
And use Telephony.Sms.Inbox.CONTENT_URI for URI and Telephony.TextBasedSmsColumns for fields

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question