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
Tom



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)
 http://commonsware.com 
Android App Developer Books:  http://commonsware.com/books.html 


Sponsored Links


Other Threads

1. Error Message when setting SDK location in Eclipse

Hi!

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
com.android.ide.eclipse.adt.AdtPlugin$11.run(Unknown 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. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        try {
        openSocket("www.google.com", 80);
        } catch (IOException e) {
        e.printStackTrace();
        }
    }

    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 www.google.com
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 google.com & 80 as an example.

All help appreciated.

richard.

--~--~---------~--~----~------------~-------~--~----~

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.