Questions tagged [looper]

A JQuery plugin for carousel. No coding required.

It is a JQuery carousel plugin to cycle through content with minimal coding. It has minimal transition effects and uses JQuery's animate function. Keyboard navigation is also available.

190 questions
0
votes
1 answer

Android code segment doesnt run without breakpoint (thread)

I have some code that will not run if I don't have a breakpoint. My speculation is that the code gets executed too quickly, and the time between me allowing a breakpoint to continue lets a thread lock on to my code. It also doesn't get "caught" with…
CQM
  • 42,592
  • 75
  • 224
  • 366
0
votes
0 answers

Usage of Looper in Alarm Scheduling in Android

so, advance note: I have not worked with the Looper before, neither with Notifications or AlarmManager, though i got some very basic understanding from Tutorials. So i am currently programming an alarm App and am a bit torn between the possibilities…
0
votes
0 answers

Android, Kotlin, Handler call twice in RecycleView

I have recycleView with audio messages. When user clicks to play button, he sees the progress of the audio message. For showing progress i use "seekbar". I noticed strange behavior on SDK33(on SDK29 was working) I have recycleView with audio…
0
votes
1 answer

How do I get a function in another thread to start the next function in the main thread after it is done?

Here is, what I'm trying to do: A Switch is turned on, starting a service in another thread (works fine so far) When this service is successful, it should then start another function within the main thread I don't mind whether the function is…
Qualla
  • 1
  • 2
0
votes
2 answers

android.util.AndroidRuntimeException: Animators may only be run on Looper threads

I am getting an error in my project. What is the problem? can you help me? android.util.AndroidRuntimeException: Animators may only be run on Looper threads at…
Nisa Efendioglu
  • 901
  • 3
  • 12
  • 22
0
votes
0 answers

Why else part is working well but not if Part, even when I am on mainThread and I do not need to use Handler to post the task to MainLooper

Private void execute(final Runnable runnable) { if (Looper.getMainLooper() == Looper.myLooper()) { runnable.run(); // Here I want to update on UI but it does not update or run UI. but when I use handler like in else condition, i see cahnges…
NiJ
  • 23
  • 6
0
votes
1 answer

how to exit ALooper_pollAll before the timeout expires

Within my android_main, I make a call to ALooper_pollAll with a negative timeout value so that it waits indefinitely until an event appears. However there are cases when I need to be able to manually exit this blocked state (without having to wait…
lost_bits1110
  • 2,380
  • 6
  • 33
  • 44
0
votes
0 answers

unit testing with jest keep on running in looper CI

Running the unit test with jest in looper for a react project. The unit test job is triggered in the looper, all the unit tests were run and getting the coverage info in the logs. Got the message - "Ran all test suites" but still looper is not…
Hari
  • 1
  • 1
0
votes
2 answers

Background Thread without Looper

My code contains two buttons and a TextView. When the program is running, by clicking on the start Thread button, a background Thread will be executed and at the same time a counter will be displayed in the TextView, and when you click on the stop…
amin
  • 311
  • 1
  • 7
0
votes
1 answer

Kotlin Immediate execute postDelayed

On specific events I want to stop a handler. I want a target to fade after several seconds. I want to interrupt and immediately fade (or extend time before fading how can I do this? What is the new best practice for accomplishing this? Here is…
0
votes
1 answer

Mockito tests for class with Handler

I'm a new one in android dev, so I have an app which contain viewPager with 2 UI fragments and 1 nonUIFragment in which operations are performed (i used "setRetainInstance(true)", it deprecated, but i must use it). In this nonUIFragment i have…
Sergei K.
  • 1
  • 2
0
votes
1 answer

java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

I am using simple thread to execute the httpGet to server when a button is clicked, but I get this after execution. Button b_back = (Button) findViewById(R.id.bback); b_back.setOnClickListener(this); Button b_sign_up = (Button)…
Kem Kod
  • 27
  • 2
  • 3
0
votes
2 answers

Android Looper confusion

Android is complaining that the code below needs to call Looper.prepare. I have tried adding Looper.prepare but the code crashes after the sixth execution, leading me to believe that it wasn't as simple as I thought. Any suggestion would be…
Michael Little
  • 507
  • 1
  • 7
  • 23
0
votes
2 answers

Running JavaScript libraries (Looper) in Blazor Server-side - some javascript code is not running

I am trying to implement Looper theme to my blazor server-side app, and I have the javascript libraries referenced at the end of the in _Host.cshtml.However some scripts in theme.min.js is not running. Why?
0
votes
1 answer

Can't create handler inside thread in android

I am trying to show the alert dialog in the if condition. ObdGatewayService.java public class ObdGatewayService{ if(e.getMessage().equals("Broken pipe")){ ((MainActivity) ctx).OBDreconnect(); } } MainActivity.java …
GNK
  • 1,036
  • 2
  • 10
  • 29