how to close activity from service

by Jacky » Tue, 10 Aug 2010 04:29:00 GMT


Sponsored Links
 Is it possible to close/finish activities in activity stack  from a
backgorund service.

--



how to close activity from service

by Kumar Bibek » Wed, 11 Aug 2010 04:36:10 GMT


 Generate a broadcast which your Activity is registered for. Depending
on the message, do whatever you want.

-Kumar Bibek
 http://techdroid.kbeanie.com 




--


Sponsored Links


Other Threads

1. Anyone know how to calculate speed WITHOUT GPS?

All the examples I see use GPS, and I have that working just fine but
I've noticed that every time I'm in a car, that unless the phone is
close to a window or the windshield the GPS does not work so...

I thought that there should be a way using course grained location
between cell towers. Does anyone know if this is possible and if so
might know where I could find some sample code please?

Thanks!

Darrin

-- 

2. Mimetype hell

Hi,

I'm juggling with MIME types and got to a dead end.

I have a file with a non standard extension "dcp" and created a specific
MIME type for it "application/vnd.portugalemgrande.clock". I've managed to
make it work with email but my problem now is with webserver. If the server
puts extra info in content-type my code doesn't work.

Let me explain:

INTENT FILTER:
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE"
/>
                <data android:scheme="http"
android:mimeType="application/vnd.portugalemgrande.clock" />
            </intent-filter>

WEB SERVER RESPONSE #1:
HTTP/1.1 200 OK
Date: Thu, 10 Feb 2011 19:57:18 GMT
Server: Apache
Last-Modified: Thu, 10 Feb 2011 19:55:31 GMT
Accept-Ranges: bytes
Content-Length: 1157
Cache-Control: max-age=1209600
Expires: Thu, 24 Feb 2011 19:57:18 GMT
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/vnd.portugalemgrande.clock
X-Antivirus: avast! 4
X-Antivirus-Status: Clean

WEB SERVER RESPONSE #2:
HTTP/1.1 200 OK
Date: Thu, 10 Feb 2011 19:57:24 GMT
Server: Apache
X-Powered-By: PHP/5.2.14
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Etag: "1297367844"
Content-Disposition: attachment; filename="clock12.dcp"
Cache-Control: private
Last-Modified: Thu, 10 Feb 2011 19:57:24 GMT
Content-Length: 1157
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/vnd.portugalemgrande.clock; name="clock12.dcp"
X-Antivirus: avast! 4
X-Antivirus-Status: Clean

The intent filter catch response #1 but doesn't work with response #2
although is a valid response.

What should I do in intent filter to make it work in both cases?

Thanks,
Pedro Duque

-- 

3. Tanya tentang market

4. Lowongan J2ME - Mobile Application Programmer

5. Kumpul di Forum bareng LG ?

6. [ask] Rekomendasi Android Phone 3 jetian

7. Android Notifier - Push Notification Dari Ponsel ke Komputer