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

Service and IntentService

If a Service is created as a subclass of IntentService base class which of the following statement is accurate? Service runs in the context of the main thread of the application owning the Service Service runs as a worker thread in the application…
-2
votes
2 answers

IntentService lost work in executor

I have a classe for download files by an executor : this.getFreshGoolgletoken(new CallBackTokenRefresh() { @Override public void getFreshGoogleToken(String token,String userEmail) { ArrayList
-2
votes
1 answer

How to pass data service to activity?

I have Three class 1.MenuActivity 2.LocationUpdateService 3.MultipleMarker 1.MenuActivity @Override protected void onStart() { super.onStart(); bindService(new Intent(this, LocationUpdatesService.class),…
Gowthaman M
  • 8,057
  • 8
  • 35
  • 54
-2
votes
2 answers

Calling a method of an Activity from another thread

I am new to android. In my App, there are some Activities with listviews/ ExpandableListViews which are populated from relevant cursors. I also have an intentservice which syncs my App DB with a server on the net. I want to call a method of the…
-2
votes
1 answer

Android: Get foreground app info from service every time a particular app enters foreground

I have been trying to write a library which i can later use for my other apps. The problem is, Once my app(main app) says my library to monitor it. The library will have to check every time the app(main app) enters to foreground. And each time it…
-2
votes
2 answers

How to Get Data from Android Service?

I have a class that extends Application public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); Intent intent = new Intent(this, MyService.class); startService(intent); …
Shizuka Masuda
  • 89
  • 3
  • 13
-2
votes
3 answers

Using Singleton SQLiteHelper in Service

I have a service that store data in SQLite. I want that service to keep running when the application is closed. (Swipe out) But getInstance() return null when the app is destroyed. How can I keep it alive even after my application is closed? My…
Jaythaking
  • 2,200
  • 4
  • 25
  • 67
-2
votes
1 answer

Android Quizz App

I'm using the following code below for an application. I want to get imageview i1 to appear on an other activity. How can I do this? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
-2
votes
1 answer

Pick a variable from onHandleIntent

I have a service class and I fetch data from an Intent in the method "onHandleIntent" and pick up in a variable. I would to call the value of this variable in onCreate, but when I call this variable I get a NULL value. (for examole in…
Giacomo Brunetta
  • 1,409
  • 3
  • 18
  • 38
-2
votes
2 answers

Static variable in Application class returns null when accessing it

I am defining a variable in application class like this public static ResultReceiver myResultReceiver = null; In some activities I am extending ResultReceiver and assigning to myResultReceiver, in stop() of activities I am making it null. Though…
Prashanth Debbadwar
  • 1,047
  • 18
  • 33
-2
votes
1 answer

how to move StrictMode.ThreadPolicy.Builder to Async task or to an Intent service?? if Intent mean it would be much helpfull

StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); how to move StrictMode.ThreadPolicy.Builder to AsyncTask or to an IntentService?? if Intent mean it would be much helpful.
-2
votes
1 answer

Build Long-term Service android

am trying to build android long-term service/intentService application. after user open the application it has only one activity with single EditText to allow user input Authentication login code after user input that the application should running…
-2
votes
2 answers

Import PDF from adobe

I am looking to do the following in andriod studio User will open his mail client and click preview on a PDF. It opens the file in adobe reader. The user makes comments in adobe and when done press share My andriod app is shown and the users…
-2
votes
1 answer

How to send notification in background?

I use IntentService to get data from database. This is my code: GetDataService.java public class GetDataService extends IntentService { public GetDataService() { super("GetDataService"); } @Override protected void…
-2
votes
1 answer

Android stop IntentService don't run in proximity Sensor

I have this code: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_head_sound,…
user1608228
  • 249
  • 1
  • 4
  • 10
1 2 3
74
75