Question about background task applications?

by Tom » Thu, 21 Jan 2010 20:03:07 GMT

Sponsored Links
 Is it possible to developp an application which :
- run in background (I know that it's possible with Services)
- is impossible to close or to stop ?

Best Regards

Question about background task applications?

by Mark Murphy » Fri, 22 Jan 2010 00:20:52 GMT

 > Is it possible to developp an application which :

No. Users can always stop background services using the Settings application.

Mark Murphy (a Commons Guy) 
Android App Developer Books: 

Sponsored Links

Other Threads

1. Error Message when setting SDK location in Eclipse


I noticed that whenever I try to set SDK location under Windows ->
Preferences, it will show the following message in my terminal.

Exception in thread "Thread-2" java.lang.NoSuchMethodError:
org.osgi.framework.Bundle.start(I)V at$ Source)

Not sure if it means anything. But so far, I can't create HelloAndroid
or open any samples.
Even though I had used as the tutorial HelloAndroid, the window "New
Android Project" will keep showing me "Package name must be
specified". (I did fill in the Package name as specified!).

Anyone has any suggestion?

I'm on Opensuse 10.2 and Eclipse 3.2.2.

2. getHostByName failing

My application tries to open a socket to a remote (ie. out on the
internet) server but fails with an "Unknown host" exception.  I've
simplified the code and plugged it into HelloAndroid as follows:

public class HelloAndroid extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        try {
        openSocket("", 80);
        } catch (IOException e) {

    private Socket sock;

    private void openSocket(String host, int port) throws IOException
        InetAddress inet = InetAddress.getByName(host);  // exception
raised here
        sock = new Socket();
        sock.connect(new InetSocketAddress(inet, port), 3000);


As the emulator's web browser can connect to
successfully I assume my network configuration is correct.  I even
disabled the firewall on my development machine but to no avail.

BTW my application will connect to a different server and port - I'm
just using & 80 as an example.

All help appreciated.



3. reg porting android on target pxa270 arm based board

4. Mail api or access to mail authentication?

5. DL Android

6. MapView showing GPS positions incorrect

7. Contacts.PresenceColumns documentation/API mismatch.