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
-1
votes
1 answer

Android, Calling a method from intentService on a particular date and time

I have a IntentService, Suppose I launch it today 27/12/2015. I want it to wait for a specific date and time i.e 05/01/2016 08:54 AM, On this date and time i want it call a method to do something.
-1
votes
3 answers

Make async http call from IntentService

I'm making some service calls from background running IntentService, but it is not waiting for service call to return. After my research, it seems there are only two options, 1. Either use Service instead of IntentService 2. Make sync http call…
Rohit Rai
  • 286
  • 4
  • 13
-1
votes
1 answer

Sending SMS from an IntentService?

I want to do the following: Send an SMS Check if it was sent Store it in a SQLite instance if it wasn't. Resend any SMS that got stored before. So you got a main SMS sending action, which will require feedback on its status (to tell the user if it…
TheStack
  • 553
  • 4
  • 12
-1
votes
1 answer

IntentService: how to add and remove intents from the worker queue?

in Android they make it seem like an IntentService is the way to go when uploading a list of pdfs in the background. How does one actually access the worker queue in order to delete a particular item from the worker queue? I also would like to…
user798719
  • 9,619
  • 25
  • 84
  • 123
-1
votes
2 answers

how to call getWritableDatabase() from a different thread or intent service, App crashing on calling it in the main thread

this is the main activity import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity { …
-1
votes
1 answer

IntentService does not work android

My code receives no crash errors. When I run the App and click the button, a Toast should show, but it doesn't. Here is my IntentService package com.example.flas; import java.io.File; import java.io.FileOutputStream; import…
-1
votes
1 answer

intentservice crashes with unfortunately has stopped error

I wnat to test intentservice. when I run app in eclipse first log showed me and then exit with this error: unfortunately, a has stopped now I dont know how solve this problem :( I have this snippet: AndroidManifest.xml
saeid ezzati
  • 855
  • 11
  • 29
-1
votes
2 answers

java.lang.RuntimeException: Unable to instantiate service: java.lang.NullPointerException

I' m a complete newcome to android and java and I'm writing an android app with android studio that should show some points on a map each 5 seconds (it's just a test). When I run the app on the emulator I get this on the logcat: 03-13 13:22:28.373 …
-1
votes
1 answer

Android Service that kills old Service when new request comes in

I need to create an android service for my application which requires the killing of a previous service of the same class when a new startservice method is called. I need this for loading data from the web to my application. I regularly poll a…
-1
votes
1 answer

Android: Why does ResultReceiver reference dissappear?

My android app has to communicate with a server. An activity thus creates an intent and starts an IntentService derivate. Following some hints, like this one, I extended ResultReceiver to handle the answers: My activity implements the contained…
derfab
  • 21
  • 2
-1
votes
1 answer

Android Database Synchronisation with Server using Thread

I want to sync database from Server to Android (One way) in background on BOOT_COMPLETED. My service is of long duration I want to get JSON from server Access local sqlite db. download image from url i got from JSON Should I use Service or Service…
Sushin PS
  • 93
  • 1
  • 11
-1
votes
1 answer

Error on the Android Intent Service

Hello i have a Problem with my Code.I want to play the Music in the Background and this will function with the IntentService of Android. But my SDk give me a Error if I implement the line. Radio.java public class Radio extends Activity implements…
etf3k
  • 1
-1
votes
1 answer

intentService thread not getting stopped permanently

Even after googling for long, I couldn't find the solution to my problem. Problem is: In my application, I launch an intent which call the file implementing intentService on click of toggle button and runs it at regular interval since…
-1
votes
1 answer

How i get the location and send with sms when phone ringing from admin?

I try to create an android application GPS tracker.When the user admin call the phone...the phone send back to admin the location with sms.I create the part when user admin call , send sms with broadcast receiver and an intent service.How i add pass…
Antonis Kan
  • 55
  • 1
  • 9
-1
votes
1 answer

How to stop an Intent Service?

I upload files to a Network using the S3 Multipart api. The upload is done in a IntentService. Now the api supports resume support, and i want to allow a user to pause and resume the upload. Now the problem is when i allow the user to press a pause…
AndroidDev
  • 15,993
  • 29
  • 85
  • 119