Questions tagged [android-intentservice]

The IntentService class provides a straightforward structure for running an operation on a single background thread.

The IntentService class provides a straightforward structure for running an operation on a single background thread. This allows it to handle long-running operations without affecting your user interface's responsiveness. Also, an IntentService isn't affected by most user interface lifecycle events, so it continues to run in circumstances that would shut down an AsyncTask

An IntentService has a few limitations:

  • It can't interact directly with your user interface. To put its results in the UI, you have to send them to an Activity.
  • Work requests run sequentially. If an operation is running in an IntentService, and you send it another request, the request waits until the first operation is finished.
  • An operation running on an IntentService can't be interrupted.

However, in most cases an IntentService is the preferred way to simple background operations.

461 questions
0
votes
0 answers

How call intent of another android application without blocking the UI

I need to make so background job without blocking the user UI, so I made a test IntentService to check how it works, but this intent service blocks the UI. In the main app, i am trying to invoke the intent as below, public void…
0
votes
0 answers

File provider error to receive pdf from another program

`# Dears, this class works well to receive PDF files from another application on below Android 6, but it gives an error for Android uper 6 ` @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public int…
tirozh
  • 1
  • 1
0
votes
1 answer

if i create an android application which is using custom service written by me , will it works same with the built in service

CUSTOM SERVICE IN ANDROID Let's say I develop an application which is using Bluetooth Manager Service which is in AOSP. But if I add a new hardware and create a HAL, AIDL, JNI, Framework Service for that hardware, will it works the same way if try…
0
votes
1 answer

startActivityForResult usage for 3 activity Android

Hey guys I have 3 activity, Activity A -> Activity B -> Activity C This flow I want to perform in my application. I want this scenario in my Activity C Scenario 1 On Back press from Activity C to open Activity B then again back press then open…
Kotlin Learner
  • 3,995
  • 6
  • 47
  • 127
0
votes
1 answer

Get action name of intent filter located in service tags in Android

I need to get action name of intent filter located in service tags from specified installed package name. Actually, this issue may related to parsing AndroidManifest.xml file, but I want to use relevant functions/classes provided by Android to get…
0
votes
1 answer

onHandleIntent not being called in Unity app Android plugin, how to fix?

I'm developing a Unity app which will be able to interface with the Android app Termux via the Intent described here: https://github.com/termux/termux-app/wiki/RUN_COMMAND-Intent#advance-examples In my Unity-Android plugin I have two…
saricden
  • 2,084
  • 4
  • 29
  • 40
0
votes
1 answer

Android intent service is finished after start

I have this Intent service: public class MyIntentService extends IntentService { public static final String TAG = "MyIntentService"; private TimerTask timerTask; private Timer timer; public MyIntentService() { …
Darius Radius
  • 169
  • 3
  • 14
0
votes
1 answer

Regarding new version of andriodx in andriod studio

I am using new version of andriox studio but i am getting some errors while i am running the project, error occurs in ContenetMainbuilding.java file Note: i am using Firebase and fragment as well ** import…
0
votes
1 answer

cannot find symbol class UploadIntentService

I´m a student learning how to crate an android app. currently i´m learning about ServiceIntents. Following my transcript: to test the upload funcionality of a button, i have to use the UploadIntentService-class. But if i write the code exactly how…
3474
  • 1
  • 2
0
votes
1 answer

Not allowed to start service Intent without permission android.permission.BIND_JOB_SERVICE

I'm currently developing a plugin for ATAK in which I need to launch a handful of services that have been imported from other modules I've created. When I try to start the services however, I receive the error as stated in the title. I'm a bit…
0
votes
0 answers

Which service should I implement if I want it to do each 5 seconds one same work?

I am new to Android and I am implementing one chat application. I want to create a service which will send one message each 5 seconds to the chat so I can test receiving messages. I am not sure which service should I implement. I am reading about…
0
votes
1 answer

I want to use Service for Phone number

See the view here I want to do this only, like when someone click on a number format, then my app should also be visible in the OPEN WITH list...
0
votes
1 answer

I am new in developing android application, i just want to know how this method if working

This works perfectly fine i can click image from my camera and update my image view with it but i don't know how this method is working. what things are passed to onActivityResult(). private void pickFromCamera() { ContentValues…
0
votes
0 answers

How does the value of an object get passed from a Receiver to MainActivity(or the calling class)?

I have to create an application that downloads files from a server using IntentService, I have created the Downloading Service and I pass it down to the receiver but I have no idea where to go from there.The result should be an Array String that…
Ioana
  • 53
  • 7
0
votes
1 answer

Is it possible to create Alarm app that runs on post Oreo devices

In past we had Alarm Manager, Intent Services, Implicit broadcast receivers, that can run even when app is not in the background. But today (post oreo) we have Work Manager & Job Schedulers. They do the stuff for us when the app is not in the…