What to do when other 'Home' app crashes? Reboot only?

by Kakyoin » Wed, 11 Mar 2009 14:00:53 GMT


Sponsored Links
 Hi. I should post this as a follow-up to my previous thread.

But I think this problem (may be) somewhat big so I create a new
thread:

1. If a user install an alternative to 'Home'. (I'll call it 2nd Home)

2. He set this 2nd Home to launch by default for 'Home' action.

3. Whenever this 2nd Home crashes, their only choice is to reboot the
system... ?

Because, after setting 2nd Home as default,  the 'chooser' will not
come out any more even if you press the 'Home' button.

In some case if this 2nd Home crashes in its initialization state,
user can go no where, can't even go to Settings -> Manage App -> Clear
Defaults

Am I missing something?

Thank you in advance.

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



What to do when other 'Home' app crashes? Reboot only?

by Kakyoin » Wed, 11 Mar 2009 15:35:11 GMT


 Hi. Thank you that's cool and will help users escape this situation.

But I wonder if we can handle this by code? Somewhere in the 2nd Home
application.

All I can think of is doing this when error occurs:

               Intent i = new Intent();
                i.setAction("android.intent.action.MAIN");
                i.addCategory("android.intent.category.HOME");
                Intent choose = Intent.createChooser(i, "Forced chooser");
                startActivity(choose);

This will create out own chooser containing 2 choices: 'Home' and '2nd
Home'.

This work quite well but when 2nd Home is NOT the default, and user
press the Home button -> there'll be 2 choosers up on screen. Up to
this point it's not a serious(dead-lock) problem now. But it just
looks weird having 2 choosers on the screen, one on top of the other.

I wonder if there's any other solution?

any opinions are welcome.

Thank you in advance. =)
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Snmp Query

HI Everybody

I yesterday starting the "developing" :-)
But not found any info from  SNMP protocol
How can I make snmpquery, snmpwalk, snmpset from android application?

Can I use the native Java snmp library (aka:snmp4.jar), examples?

Thnx Robit

-- 

2. How can I use the MediaScannerService to scan a video on the network

Hi,

I am trying to develop a DLNA client. I want the user to see all the
playable data (not at the same time) on the network.
I wanted to store the information of the media in some form of a
database. I tried to use MediaService to scan a particular media

http://10.205.111.81:10243/WMPNSSv4/2201497635/1_ezQ3MzNGOERCLTE4MkMtNDBEOC1BQTNDLUZFOTg1RjUyQTlBRX0uMC44.mp4

This is a video on one of my media servers.
 and this is the error I am receiving.


03-11 17:17:04.215  1201  1201 E >>>>>>>>>>>>>>Working<<<<<<<<<<<<<<<:
onMediaScannerConnected
03-11 17:17:04.343   969  1209 W MediaScanner:
MediaScannerClient::setLocale is not supported on GTV.
03-11 17:17:04.343   969  1209 E MediaScannerService: Exception in
handleMessage
03-11 17:17:04.343   969  1209 E MediaScannerService:
java.lang.IllegalStateException: Unable to create new file:
http://10.205.111.81:10243/WMPNSSv4/2201497635/1_ezQ3MzNGOERCLTE4MkMtNDBEOC1BQTNDLUZFOTg1RjUyQTlBRX0uMC44.mp4
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
com.android.providers.media.MediaProvider.ensureFile(MediaProvider.java:
1345)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
com.android.providers.media.MediaProvider.insertInternal(MediaProvider.java:
1586)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
com.android.providers.media.MediaProvider.insert(MediaProvider.java:
1381)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
android.content.ContentProvider$Transport.insert(ContentProvider.java:
150)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
android.media.MediaScanner
$MyMediaScannerClient.endFile(MediaScanner.java:781)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
android.media.MediaScanner
$MyMediaScannerClient.doScanFile(MediaScanner.java:536)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
android.media.MediaScanner.scanSingleFile(MediaScanner.java:1208)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
com.android.providers.media.MediaScannerService.scanFile(MediaScannerService.java:
200)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
com.android.providers.media.MediaScannerService.access
$100(MediaScannerService.java:48)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
com.android.providers.media.MediaScannerService
$ServiceHandler.handleMessage(MediaScannerService.java:244)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
android.os.Handler.dispatchMessage(Handler.java:99)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
android.os.Looper.loop(Looper.java:123)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
com.android.providers.media.MediaScannerService.run(MediaScannerService.java:
188)
03-11 17:17:04.343   969  1209 E MediaScannerService:   at
java.lang.Thread.run(Thread.java:1096)
03-11 17:17:04.347   652   672 D Checkin : Logging stats:
CRASHES_REPORTED(count 1, sum 0.0)
03-11 17:17:04.559   652  1306 I DumpStateReceiver: Added state dump
to 1 crashes


Is it possible to scan a file and add it to the MediaStore db or will
I have to create my own scanning service and db for this.

Also how would i scan a file in android. I know linux has a "file"
command which would tell what kind of file is it.

Thanks,
Mrinal

-- 

3. Table tag in html content cannot be loaded by webview(witch WebView.loadData)?

4. Android App login

5. Java Script alert not working in Android WebView

6. how many messages can I send via C2DM?

7. MediaPlayer.isPlaying() question