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

IntentService onHandleIntent is running on main thread

I decided to use intent service for a task involving looping big number of results, calculating a summary result and inserting it back in firestore. This is how i am calling my intent service from activity. onDataSnapShotListenerForPointsAndRating =…
hina abbasi
  • 445
  • 1
  • 4
  • 14
-1
votes
1 answer

How to retain value after going from one Actitivity to another and coming back to the previous actitivity?

So the working of my application is it has an activity called "Add Reminder" this activity has some textbox which the user can enter values in them then the user goes to the next activity by clicking a button which is a GoogleMaps and they can tap a…
-1
votes
1 answer

How to open user profile in Fiverr App directly from android intent

I was wondering if there is a direct intent available in Android that can open a user profile in Fiverr App installed in the phone
Syed Faisal
  • 61
  • 1
  • 3
-1
votes
1 answer

Intent Service or Service for multiple file uploading?

I'm trying to upload multiple files to firebase and want to keep uploading even if the app is killed just like google drive. Should i use intent-service or service for this?
parag pawar
  • 193
  • 3
  • 13
-1
votes
2 answers

Which should I use class for the stopwatch to run in the background. "IntentService" or "service"

what service class should I use for the stopwatch that will run on the background Which one should I use in terms of performance.
kksal55
  • 500
  • 7
  • 14
-1
votes
2 answers

How to Upload images even when the app is killed in android

I'm calling upload images api, in IntentService which is running in the background and upload the images to server. IntentService, onHandleEvent method is called and run in the background, what I understand is IntentService will execute the task and…
Praneeth
  • 1,260
  • 18
  • 37
-1
votes
1 answer

Android java. From a service, i want to download a file

I get an exception of networking in the main thread. Should I try to do it from a IntentService and can I even start an IntentService from a Service? Is it a good practice?
magiccus
  • 74
  • 7
-1
votes
1 answer

Android: IntentService suddenly stops

I am developing a tracking application in android. While I tested the application I found a problem: I'm using AlarmManager to start a WakefulBroadcast that calls an IntentService, inside the OnHandleIntent method I'm calling…
-1
votes
2 answers

Launching mutliple threads inside an IntentService

What I want to do sounds pretty simple in theory - I need to scan all the MP3 files present in the device, and perform some metadata updates by querying something like AcoustId or GraceNote. I'm planning on using a class by extending IntentService,…
-1
votes
1 answer

Intent Service "No receiver received" when fetching an address

E/FetchAddressIS: No receiver received. There is nowhere to send the results. I'm trying to use an intent Service to get a street name from a lastKnownLocation object. It's throwing a hissy, and I see no reason why. The code is from Google…
Sam
  • 1,659
  • 4
  • 23
  • 42
-1
votes
3 answers

Can't get sharedPreferences inside IntentService

Problems using SharedPreferences on a Service (getPreferences doesn't exist on a service) This topic didn't helped me, I created keys and saved them in an activity and tried to get them from the IntentService and I couldn't get them, I tried several…
LamaTo
  • 540
  • 1
  • 8
  • 21
-1
votes
1 answer

Difference when starting timer inside service and activity

I want to have a periodically task that should be run every 30 seconds. so I'm using ScheduledThreadPoolExecutor or Timer ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1); executor.scheduleWithFixedDelay(new…
Trần Kim Dự
  • 5,872
  • 12
  • 55
  • 107
-1
votes
2 answers

difference between Service and IntentService

To know the difference between IntentService and Service in Android, I created the below posted small test of an IntentService class. The IntentService class can be started using startService(intent); which will result in a call to…
-1
votes
1 answer

How to call OnhandleIntent from another class?

i have two class Register.java and fragment1.java this is Register.java `import com.google.android.gms.gcm.GoogleCloudMessaging; import com.google.android.gms.iid.InstanceID; import java.io.IOException; public class RegisterApp extends…
-1
votes
2 answers

How to pass String From IntentService To Activity

How to pass String From IntentService To Activity. MyService.java protected void onHandleIntent(Intent intent) { String abc ="XYZ"; // pass this string to Activity class } Activity is same which is calling Service class.
user5450589