Aj_
Aj_

Reputation: 502

List of all extras applicable to an intent

Is there a way to know what all extra-keys are applicable to a particular intent? For example if i create an intent,

Intent cropIntent = new Intent("com.android.camera.action.CROP");

then the following putExtra calls are some that are applicable.

cropIntent.putExtra("aspectX", 1);
cropIntent.putExtra("aspectY", 1);
cropIntent.putExtra("outputX", 256);
cropIntent.putExtra("outputY", 256);

So how can I get the list of all the extra-keys that are related to the intent?

Upvotes: 2

Views: 311

Answers (1)

Ted Hopp
Ted Hopp

Reputation: 234795

Generally, the only way to know what extras are supported is to look at the documentation for the action. If the source code is available, that's the only other way to know.

In your particular example, unofficial documentation can be found here. The source code happens to be available here. Look in CropExtras.java for the available keys and dig through CropActivity.java for how they are used. However, note that using com.android.camera.action.CROP is probably not a good idea, as explained in this blog post and in the answer in this thread.

Upvotes: 4

Related Questions