android-intentservice

Cannot do work in background periodically with alarmmanager

会有一股神秘感。 提交于 2021-01-27 10:39:50
问题 I want to call a service in background by the hour. first problem is alarm manager is not working smoothly. Timer is terrible, sometimes early sometimes later. second problem is, RemoteServiceException : Context.startForegroundService() did not then call Service.startForeground() , I cant understand why I get this exception MainActivity public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { Intent intent1 = new Intent(MainActivity

Implement Bluetooth Connection into Service or Application Class without losing connection into a Device

﹥>﹥吖頭↗ 提交于 2020-05-07 19:59:14
问题 i need some help, can you explain to me how can i implement the Bluetooth Connection from my Application into my Mini Thermal Printer Device. The scenario is like this. I already connect my application into device but when the Activity destroyed, the connection also disconnected. Yes, i am aware that when the activity destroyed all the task within the activity is affected. The device has it's own SDK. and that what i am using now. That's why, i really need your help to get over on this

Implement Bluetooth Connection into Service or Application Class without losing connection into a Device

流过昼夜 提交于 2020-05-07 19:55:10
问题 i need some help, can you explain to me how can i implement the Bluetooth Connection from my Application into my Mini Thermal Printer Device. The scenario is like this. I already connect my application into device but when the Activity destroyed, the connection also disconnected. Yes, i am aware that when the activity destroyed all the task within the activity is affected. The device has it's own SDK. and that what i am using now. That's why, i really need your help to get over on this

Can multiple Android IntentServices run at the same time?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-15 06:19:11
问题 From what I understand, an IntentService can only handle one Intent at a time as it shares a worker thread to do all of its work. But if I have multiple IntentService s in my app, can they run in parallel, or do they all share the single worker thread as well? 回答1: But if I have multiple IntentServices in my app, can they run in parallel If you mean that you have multiple subclasses of IntentService , they should be able to run in parallel. 来源: https://stackoverflow.com/questions/25879610/can

Can multiple Android IntentServices run at the same time?

泄露秘密 提交于 2020-01-15 06:18:06
问题 From what I understand, an IntentService can only handle one Intent at a time as it shares a worker thread to do all of its work. But if I have multiple IntentService s in my app, can they run in parallel, or do they all share the single worker thread as well? 回答1: But if I have multiple IntentServices in my app, can they run in parallel If you mean that you have multiple subclasses of IntentService , they should be able to run in parallel. 来源: https://stackoverflow.com/questions/25879610/can

Does intent go queue when calling startService for IntentService multiple times?

半世苍凉 提交于 2020-01-12 07:12:10
问题 I want to download from internet with a IntentService . I pass a url through Intent to IntentService by calling startService(intentserive); . If I call startService for a various intents, do the intents go queue for download? 回答1: The short answer to your question is YES. From the docs: IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand. Clients send requests through startService(Intent) calls; the service is started as needed,

Unable to find explicit activity class {}; have you declared this activity in your AndroidManifest.xml

…衆ロ難τιáo~ 提交于 2020-01-11 09:17:48
问题 I'm trying unzip some files in background, so I use IntentService like in google's tutorial. My service class declared in AndroidManifest like this: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.osmdroid"> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" /> <application android:configChanges="orientation|screenSize|keyboardHidden" android:hardwareAccelerated="true" android:icon="@drawable/ecn_icon" android:label="@string/app_name" android