How to start a background service on install

by klavin » Sat, 23 Oct 2010 01:23:34 GMT


Sponsored Links
 I have an app which runs as a background service only. I'l like it to
start up when its installed.
As its just a background service it doesnt show up on the pane of
installed apps. So there is no way for the user to manually start it.
I've already regietered for the BOOT_COMPLETED intent which works but
I dont want the user to have to power off the phone after the app has
been installed, just so as they can start it.

I've looked at the following intents: ACTION_PACKAGE_ADDED/CHANGED/
REPLACED/RESTARTED/INSTALL, ACTION_SCREEN_ON/OFF, ACTION_USER_PRESENT,
ACTION_TIME_TICK,
but it doesnt seem that you can register to listen for them from my
manifest.

Any idea how I can start my background service without a power off/on?
Thanks

--



How to start a background service on install

by Mark Murphy » Sat, 23 Oct 2010 01:31:48 GMT


 


That is not supported. Please let the user choose when to start up
your application.


That is an invitation to a whole lot of one-star ratings on the
Market. By most reports, users do not like installing which have no
icons in the launcher.


Then add an activity that adds value to your application, and along
the way sets up the alarm for AlarmManager for your periodic
background work. For example, you could allow the user to change the
frequency of the background work (including "never") in the form of a
PreferenceActivity.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

--


Sponsored Links


Other Threads

1. OOT: Iseng nanya soal angry bird di android

Iseng nanya neh... golden eggs yang ke 17 emang ngebug ya di android ???

ada golden eggs 18 gak ya ?

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

2. SharePoint Interactive Online Training at BigClasses.com

* 100% JOB Oriented Training
* Attend Two FREE Trail Classes
* Affordable FEE with REAL TIME Trainers

SharePoint course content:  
http://bigclasses.com/cms/microsoft-technologies/share-point-moss.html

BigClasses.com is a Global Interactive Online Learning Portal started
by Microsoft Technologies Experts with an aim to provide a Job
Oriented Training on Microsoft Technologies.

ABOUT OUR FACULTY: We have excellent SharePoint instructors, who have
Industry experience & experts in Online Training.

TRAINING HIGHLIGHTS:
1. Interactive Learning at Learners convenience
2. Industry Savvy Trainers
3. Learn Right from Your Place
4. Customized Curriculum
5. Support after Training
A) Resume Preparation
B) Certification Guidance
C) Interview Assistance

Guaranteed Placement Assistance for USA Learners

We have a forthcoming online batch on SharePoint

OTHER Microsoft Technologies OFFERED:

ASP.Net, C#.Net, SharePoint, VB.Net, WPF, WCF, WWF.

OTHER TRAININGS OFFERED:
* SAP
* IBM Mainframes
* Data Warehousining Tools
* Testing Tools

Visit: www.bigclasses.com
CONTACT
US:cont...@bigclasses.com
USA: 1-302 525 2655
INDIA: 91-800 811 4040 for Career Advice
Skype ID: Gtalk ID: Yahoo ID: Hotmail ID: bigclasses
17112010krn

-- 

3. Android File writing doubt

4. Log

5. How to copy android home shortcuts from one device to another ?

6. Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]

7. Spinner in ListView Activity