Questions tagged [android-thread]
147 questions
1
vote
1 answer
When Android phone has SoC with 6 cores then what does it mean form app developer perspective
I have phone with Snapdragon 632 Mobile Platform and some random Android app which shows what your phone has inside (RAM, SoC, sensors, screen density etc.) shows it has 8 cores.
What does it mean from Android app developer perspective?
So I can…

Marian Paździoch
- 8,813
- 10
- 58
- 103
1
vote
2 answers
SmsManager with delay between send each sms
Good morning, thanks and sorry for my english!
I'm working in an android app, i want that the app send a lot of sms with SmsManager. That's fine, but the problem its when i try to implements any type of beetween the sending of each sms. I tried with…

Squalo
- 21
- 3
1
vote
1 answer
Torch: How to register a torch callback in another thread?
I am trying to register a CameraManager.TorchCallback using CameraManager.registerTorchCallback into a specific thread (ie: different from the UI Thread).
My code is quite basic for an Camera2 implementation:
Get the CameraManager
Get the camera id…

Nicolas Terisse
- 43
- 1
- 9
1
vote
0 answers
Sent/Received messages gets repeated and order gets spoiled in peer-to-peer chat app in android using socket
I am developing a peer-to-peer chat app using socket programming in android. The port number of self and IP address and port number of the other peer is given as input and connection is established through socket. I have implemented chat activity…

Faiyaz Khan Shayor
- 11
- 1
1
vote
3 answers
What is the difference between these methods for running code on UI Thread?
There are different methods posted on the web on how to run code on the UI thread. They all accomplish the same task, however, I really want to know the difference between these methods.
Method 1:
new Handler(Looper.getMainLooper()).post(new…

Mena
- 3,019
- 1
- 25
- 54
1
vote
1 answer
Update ProgressDialog with ProgressBar after rotation
My application processes some images in a thread and meanwhile it shows a dialog with a progressbar.
progressDialog = new ProgressDialog(Activity.this);
progressDialog.setProgressStyle(size);
progressDialog.show();
Thread thread = new Thread(new…

Johannes
- 481
- 1
- 5
- 16
1
vote
2 answers
start activity in custom UncaughtExceptionHandler class not working any more
I used to handle exception errors with this class and pass error as String to another activity for show , but this way not work any more , seems when kill process happened "sag.class" Activity cant launch any more
public class ExceptionHandler…

Erfan
- 3,059
- 3
- 22
- 49
1
vote
0 answers
SwipeRefreshLayout Circle is lagging during refresh
In onResume I set and update my recylclerview adapter in a thread. Before setting or updating I do swipeRefreshLayout.setRefreshing(true) and after this swipeRefreshLayout.setRefreshing(false). But the circle of the SwipeRefreshLayout is lagging or…

Johannes
- 481
- 1
- 5
- 16
1
vote
1 answer
Returning values from Volley / AsyncTask to calling method
So say I have a class for performing Api calls that extends the volley Request class:
public class ApiCall extends Request {
private Listener listener;
private Map params;
public ApiCall(int method, String…

Limace
- 11
- 1
1
vote
0 answers
application crashes when canvas.drawCircle is called in onDraw
I'm trying to draw three circles using the canvas in onDraw.
onDraw is called by the Thread.
But each time canvas.DrawCircle occures, the app crashes.
There's another problem. I'm extending surfaceView, but SurfaceCreated is never called. I think…

Quentin Girault
- 41
- 1
- 2
- 8
1
vote
1 answer
Should you abort all running threads in and Activity's onDestroy()
I have an Activity which runs a number of separate downloading tasks on different threads. They are creating in onCreate() like this:
public override void OnCreate()
{
base.OnCreate();
workerThread = new Thread(() =>
{
…

Moffen
- 1,817
- 1
- 14
- 34
1
vote
1 answer
Operator '+' cannot be applied to int,'com.fasterxml.jackson.core.io.SerializedString'
I'm facing Operator '+' cannot be applied to int,'com.fasterxml.jackson.core.io.SerializedString' Error in run method of a thread.
Here's the code block
runOnUiThread(new Runnable() {
public void run() {
…

Nithis Kumar
- 278
- 2
- 5
- 21
1
vote
1 answer
Android Thread AND Services Priorities
I was reading in the Web (Why to use Service if it runs in the same thread in android) about Services and Threads and i came to a conclusion that in general Services have a higher priority than Thread.
I have an app that executes a download…

Nick
- 2,818
- 5
- 42
- 60
1
vote
3 answers
Getting bitmap from file path
So the thing is that i want to get Bitmap from absolute path, so i pass those paths as ArrayList to my presenter, where i have next piece of code:
private void decodeImageUri(final ArrayList imageUris) {
while(imageCounter <…

RadoVidjen
- 432
- 7
- 17
1
vote
0 answers
How I can make request OkHttp in Service use Thread?
I have trouble creating Thread in a Service and in Thread I use OkHttp. When running the app I get an error
E/AndroidRuntime: FATAL EXCEPTION: Thread-468
java.lang.RuntimeException: Can't create handler inside thread that has not…

Ngọc Anh
- 99
- 1
- 6