Questions tagged [android-os-handler]

A Handler allows you to send and process Message and Runnable objects associated with a thread's MessageQueue. Each Handler instance is associated with a single thread and that thread's message queue. When you create a new Handler, it is bound to the thread / message queue of the thread that is creating it - from that point on, it will deliver messages and runnables to that message queue and execute them as they come out of the message queue.

A Handler allows you to send and process Message and Runnable objects associated with a thread's MessageQueue. Each Handler instance is associated with a single thread and that thread's message queue. When you create a new Handler, it is bound to the thread / message queue of the thread that is creating it - from that point on, it will deliver messages and runnables to that message queue and execute them as they come out of the message queue.

29 questions
0
votes
0 answers

Override function onTaskRemoved of service is not getting called in the Redmi Device

I have an use case like on user kills/clear the app manually, a function to be triggered ,I have tried using the onDestroy unfortunately the fn is not called hence I have gone with service and implement as below code class MyService: Service()…
arun
  • 95
  • 13
0
votes
0 answers

App crashes after Android OS update. How to solve it?

while developing the currently serviced app, the user's problem continues to be checked. I'd like to ask if anyone has had a similar problem or knows how to do it. App closes after OS update After running the app, the checked log progresses to the…
0
votes
1 answer

Launcher on Android Operating system

I have created an android application. I want to display only that application on a tablet and not any other application from the android operating system. I know that happens by creating a launcher. The scenario is, I have to place that tablet on a…
0
votes
0 answers

How to reset/restart the app when onTrimMemory() method is called?

Currently I am handling onTrimMethod(int level) in my app with ComponentCallbacks2.TRIM_MEMORY_COMPLETE and ComponentCallbacks2.TRIM_MEMORY_RUNNING_CRITICAL. I get this callback easily with low end devices when my app is running in background and…
0
votes
1 answer

AlarmManager schedule Alarm on application start

this is a very dumb question and I still cannot figure out how does AlarmManager work in Android. Suppose I want to schedule a repeating task every half an hour. I want to schedule it at activity onCreate(). I do something like this: @Override …
0
votes
0 answers

Log gps location requests in OS?

For research purposes, I want to find out how often the Facebook app retrieves info on GPS coordinates from the mobile phone. Do you know any way to log "location requests" made by apps in Android? Or any other methods to examine it? I can't sniff…
Kristoffer
  • 1,984
  • 3
  • 14
  • 29
0
votes
1 answer

How to get the error log from android process and when to call the get error log method?

I have implemented the try catch on the exception possible places. There are different other exception will be thrown by android OS[Database Exception, Permission and other exception]. I want to write those error log data into file{only there is a…
M Vignesh
  • 1,586
  • 2
  • 18
  • 55
0
votes
0 answers

How to use the call back from the android OS whenever any changes occur in of battery percentage, time, calendar, location, who is calling etc

I was trying to do an app and I got stuck in retrieving the status of battery percentage, time, calendar, location, who is calling etc., and since indeed to continuously track the status of such things the polling logic is not a good idea. So, I was…
0
votes
0 answers

Android.os.HandleIntent calling the intent service without extravalues

I am developing the android application to get user activity in the background. Here is my code public class ActivityRecognitionService extends IntentService implements…
ida
  • 1,011
  • 1
  • 9
  • 17
0
votes
0 answers

android - handler don't work in loop

I want to do app to show 3 elements (each 2 seconds) and each start showing after the before element. Here is code: public void gameStart() { do { Handler handler = new Handler(); handler.postDelayed(new Runnable() { …
Seravier
  • 145
  • 1
  • 2
  • 11
0
votes
2 answers

How to show and hide one view from diffrent threads in java?

I write my first java program for Android which draws some 3D functions (f(x,y)) using OpenGL, and the program is almost done but I experience problems with showing and hiding custom progress bar, developed as LinearLayout (which I created) with…
-1
votes
1 answer

How miui 10 is able to automatically turn on mobile data and gps for emergency sos while it is not permitted for android 4.4 and above?

We can not programmatically turn on mobile data and gps but still miui 10 has emergency sos feature under which it automatically turns on mobile data and gps. So how can I do this with stock and source code?
-1
votes
1 answer

How to access android OS through android studio OR from any other Tool.?

I am doing my final year project on detecting and blocking android Cross Site Scripting (XSS) Attacks in WEBVIEW. For that i want to access android Operating System (OS) from where i will detect attacks and block them. Main problem i am facing is…
-4
votes
2 answers

How to block "Monkey Test " & "Time Service" Malware in android?

Antivirus shows these apps as malware, I tried to uninstall these apps but after sometimes system install these apps automatically. Can anyone suggest how to stop this?
Sujay
  • 601
  • 1
  • 10
  • 19
1
2