Gallery Android 2.1 is not backward compatible with Cupcake version, now what?

I don't know why, but in Eclair the default (non-fancy) gallery app changed its origin from the Cupcake version and it broke one of my commercial apps :-(

First, when you long press on the gallery and select "Diashow", it does not publish an intent, which will be picked up by any application that already implements an intent filter. Instead, it will call "com.android.gallery/com.android.camera.ViewImage" directly with additional functionality.

Question: Is it still possible to intercept this intent and let the user select my application to create Diashow?

Second, the extras intents for the VIEW intent are messed up (in my 2.1 version anyway): instead of providing the BucketId of the image in the Intent request parameter. But in 2.1, the BucketId is moved to the Intent. Besides; it does not transmit BUCKET_ID

, but unclassified BUCKET_DISPLAY_NAME

instead of: - /

The question is, how can I get unique BUCKET_ID

from intent so that I don't have to work with potentially non-unique BUCKET_DISPLAY_NAME

?

Is there anyone who has come up with a working solution for these problems?

I thought the whole idea behind Android Intents was to be able to integrate your apps into the underlying Android environment, but my build 2.1 proves that this idea still lives on in The Land of Theory :-(

+2


a source to share


2 answers


First, when you long-press the gallery and select "Diashow", it doesn't publish the intent, which would be any app that implements the Intent filter anymore.

Something that Intent

probably wasn't part of the SDK, which means you shouldn't have to rely on it in the first place. For the Gallery app that is part of the SDK, no Intents

, except that Gallery supports a generic one Intents

(e.g. GET_CONTENT

, PICK

).

Question: is it still possible to intercept this intent and the user to select my Diashov app?

I hope not, because that would mean a serious security hole.



The question is: how can I get the unique BUCKET_ID from an intent so that I don't need to work with the potentially non-unique BUCKET_DISPLAY_NAME?

This one is Intent

not documented. Please don't try to use it. Your app will break on some Android devices that don't ship the default Gallery app. Your app will break in future versions of Android, as you've already experienced. Please adhere to Intents

those documented by the author of the application.

I thought that the whole idea of ​​Android Skills should have been able to integrate your applications with the Android environment base

Only where these Intents

have been documented and maintained by the authors of the application in question. If you thought you could just take a random Intents

one that you found in the source code or LogCat or whatever and use them, you are wrong.

+1


a source


Question: is it still possible to intercept this intent and the user to select my Diashov app?

Answer your first question .... But with that, you might need to rebuild your application and then update ...

To make your activity target only your intent, add an extra flag to the intent, or create your own activity and then fire the intent. When receiving an activity, set an intent filter in your app manifest file that mentions your custom action. You are done here. Only the action assigned by your custom intent filter will receive your intent.



The question is: how can I get the unique BUCKET_ID from an intent so that I don't need to work with the potentially non-unique BUCKET_DISPLAY_NAME?

Do not try to do this, as you may run into problems as it may break your application in previous versions of Android.

0


a source







All Articles