android-service

how to call an activity when getting incoming call.

霸气de小男生 提交于 2019-12-20 10:57:33
问题 Hi all i want to invoke a my own activity over the default incoming call activity.. i have done this with using broadcast receivers i am invoking my activity when getting incoming call. but it is working fine for first time from second time when i get incoming call then default incoming call activity is coming over my activity . i don't know what is the problem can any one please help me .. Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com

Bind to service from new Context for configuration changes or bind from app context?

别等时光非礼了梦想. 提交于 2019-12-20 09:41:43
问题 I'm trying to work out if bound service is appropriate for doing background work in my app. The requirements are that various application components can make web requests through it of varying priority. (Thus the service must maintain some sort of queue and be able to cancel it's ongoing requests for others of higher priority). I'd like the service to be relatively unobtrusive to the user such that they don't find it running after they are done with the application - if I want to do something

How to transfer files between Android applications running on the same device?

ぐ巨炮叔叔 提交于 2019-12-20 08:58:03
问题 I am writing an Android application that interfaces with a RESTful service. This web service essentially fronts a file system, and provides metadata as well CRUD access to the files. My application retrieves the metadata, and exposes it to 3rd party apps through a ContentProvider . I need to add the ability for 3rd party applications, running on the same device as my app, to CRUD the actual files by making requests to/from my app (not directly with the server). This means they need to either

How to perform notification-action (click) on lock-screen?

巧了我就是萌 提交于 2019-12-20 08:36:24
问题 TL;DR How can I make a notification that does some work from the lock-screen without unlocking? After clicking an action, a button on the notification or just the complete notification, I want to do an API call (without typing my unlock code) Details Goal Based on the answer on this question I tried to make a notification with an action that works on the lockscreen without unlocking the device. The action is something that doesn't need any further interface or interaction (think 'send an API

take photo from camera in service

时间秒杀一切 提交于 2019-12-20 07:25:48
问题 How can Take picture from front camera in service without showing camera on screen. I have service class public class PhotoTakingService extends Service { //Camera variables //a surface holder private SurfaceHolder sHolder; //a variable to control the camera private Camera mCamera; //the camera parameters private Parameters parameters; boolean mPreviewRunning = false; /** * Called when the activity is first created. */ @Override public void onCreate() { super.onCreate(); } @Override public

Stop a service after MainActivity is closed (EDITED)

风流意气都作罢 提交于 2019-12-20 06:11:07
问题 I think im not clear at all, i do want the service to persist even if the main activity is destroyed via user action or android system does it, it does it well, but when the app is reopened at certain point i will want to check if a bg activity exists and stop it using a action button, THX in advance. I launch a background service, in my MainActivity I can stop it and rerun it, the service persists when the app is closed from the running apps list, the problem is when I relaunch the closed

takePicture failed when running a Camera Service

此生再无相见时 提交于 2019-12-20 05:38:27
问题 im trying to run a Camera Service in the Background, as soon after the Service has started i get an error takePicture failed . I'm new to Android,new to Stackoverflow and also not a good programmer. I've added the right permissions and the service has been declared in the manifest file too. package com.example.nevii.camera; import android.app.Service; import android.content.Intent; import android.hardware.Camera; import android.hardware.Camera.Parameters; import android.os.IBinder; import

Why does the background service stops while running?

六月ゝ 毕业季﹏ 提交于 2019-12-20 05:19:18
问题 I have a background service in my android application.In which a thread listening recent tasks running frequently.My service overrides both onCreate() and onStartCommand() methods. When i tried to open some applications like Gallery , Camera etc..., the service will be stopped.It calls the onCreate() method only and not onDestroy() or onStartCommand() .I tried to override onLowMemory() in this service but it logs nothing.The application saved internally by specifying android:installLocation=

Android - Trouble with service sending multiple local notifications

喜欢而已 提交于 2019-12-20 04:08:15
问题 I've inherited a code base for an Android app and I'm facing a particularly though problem with local notifications. The idea is to send a notification for each event which is scheduled in the future, considering also the reminder preference on how many minutes before the event the user wants to be notified. Everything works just fine, except that after the notification is thrown for the first time, if the user opens the app before the event starts, the notification gets thrown another time.

ActivityNotFoundException while trying to start a service.

自作多情 提交于 2019-12-20 03:12:46
问题 I am getting an Activity not found exception while trying to start a service. I have the service registered in the Manifest. Adding what I think is the relevant code and the LogCat. Let me know if you need to see any more. 01-29 17:41:51.440 9196-9196/drvr.drvlog E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: drvr.drvlog, PID: 9196 android.content.ActivityNotFoundException: Unable to find explicit activity class {drvr.drvlog/drvr.drvlog.GPSService}; have you declared this activity in your