Questions tagged [intentservice]

IntentService is a special implementation of Android service component.

IntentService is a special implementation of Android service component that handles asynchronous requests (expressed as Intents) on demand, one at a time. The service is started when Intent is received, handles each Intent in turn using a worker thread, and stops itself when it runs out of work.

All requests are handled on a single worker thread -- they may take as long as necessary (and will not block the application's main loop), but only one request will be processed at a time.

1118 questions
0
votes
1 answer

IllegalStateException listView updating from the service

I use IntentService for recieving some data from the web-server and update my listview in Activity with this data. I used static ArrayList in the Activity and when I've got updatings from the server, I added item to the static ArrayList and sent…
0
votes
3 answers

Update List view to specific item position

I am having a receiver that broadcast when a intent service finishes a server call,When receiver is broadcast in onReceive I have updated list view with new data. What I want is to set the position of item to last element in a list before the…
Dory
  • 7,462
  • 7
  • 33
  • 55
0
votes
2 answers

List View not updated

I am having a list view in activity. In Activity I have set alarm at particular interval to start intent service to get data from server,after it finishes a server call response is broadcasted back to activity from intent service and update the…
Dory
  • 7,462
  • 7
  • 33
  • 55
0
votes
2 answers

intentService to activity using LocalBroadcastManager

I have been trying to use LocalBroadcastManager but it does not seem to work. Basically I want my intentService to broadcast an intent whenever it's running. I then want my activity to receive the broadcast whenever the user is actively using the…
axr 0284
  • 113
  • 1
  • 9
0
votes
2 answers

My IntentService doesn't seem to return an answer, or it isn't called at all?

I've got a problem with my IntentService - my intention is to outsource the networking and processing from the activity (I previously used an AsyncTask which worked excellent, however I also want to extend it to a widget). The thing is, I don't get…
ToVine
  • 560
  • 5
  • 16
0
votes
0 answers

AlarmManager and IntentService...only the 1st cycle is done after booting

so i got this alarm manager that can be triggered by a intentService with BOOT_COMPLETED.. the alarm manager work is to call another intent service every 10 mins.. this intent service updates an SQLite database value.. 7:00 = boot time, alarm…
mcr619619
  • 435
  • 1
  • 4
  • 13
0
votes
0 answers

SQLite query returns nothing, movetoFirst Method successful in an Activity, but in IntentService, gives me error

When I query something and it doesnt return something, if(cursor.moveToFirst()) { //logic} works well in an activity, but the same cannot be say when using it in a intent service.. i dont know whats wrong, when the query returns something (selecting…
mcr619619
  • 435
  • 1
  • 4
  • 13
0
votes
1 answer

IntentService Stops After Data Insertion into SQLite and Gives NULLPOINTER EXCEPTION when insert 2nd time

I'm developing an app in which data saved into database when there is no covered area of mobile signals. When service came back it will fetch all data from database and upload on server. Now I have two problems. IntentService stops when 1st time…
Haris
  • 1,179
  • 7
  • 15
  • 32
0
votes
1 answer

NullPointerException when insert and Data Retrival and Access error

I'm trying to insert data into a database when there is no network, but it gives me a NullPointerException. When it goes online, it gives some others and crashes my app. LogCat Error 10-13 01:27:07.614: E/Service(13862): Service Created.. …
Haris
  • 1,179
  • 7
  • 15
  • 32
0
votes
0 answers

BroadcastReceiver for call answers

I'm trying to programmatically intercept a call answer. I've got a BroadcastReceiver with the following method: @Override public void onReceive(Context context, Intent intent) { Bundle extras = intent.getExtras(); if (extras != null) { …
auino
  • 1,644
  • 5
  • 23
  • 43
0
votes
1 answer

How to restart Service using IntentService in android

I am able to stop my ServiceA(it is started using AlarmManager) when an IntentService is running by sending a broadcast from IntentService to broadcast receiver. I want to Start the same ServiceA again after my IntentService finished his work. Ex-I…
Mr Nice
  • 524
  • 8
  • 24
0
votes
1 answer

WakefulIntentService NEW CRASH reports as my users are migrated to ICS?

My users are slowly being migrated to ICS (Android 4.0 and above) and since then I can see new crash reports appearing ... it looks like its my implementation of WakefulIntentService that triggers the following error: java.lang.NullPointerException…
Hubert
  • 16,012
  • 18
  • 45
  • 51
0
votes
1 answer

Android AsynchTask inside IntentService

I'm trying to run a asynchronous task inside the IntentService for downloading a file. However when I start the downloading thread, I get the following warning, and the process doesn't proceed. W/MessageQueue(10371): java.lang.RuntimeException:…
Ryo
  • 2,003
  • 4
  • 27
  • 42
0
votes
1 answer

Android IntentService how can i know the number of instances in the running queue ?

Is there any way i can find out the number of instances of a Queue for an IntentService ? Secondly can i suspend a particular instance of a IntentService ? Kind Regards.
AndroidDev
  • 15,993
  • 29
  • 85
  • 119
0
votes
1 answer

Service sending multiple broadcasts Android

I have an activity that offloads multiple uploads to a Intent Service. Each upload has its own IntentService that naturally get executed one by one. My Activity has a Broadcast Receiver like this public class ResponseReceiver extends…
AndroidDev
  • 15,993
  • 29
  • 85
  • 119