Thanks Guys. I added a receiver with CAMERA_BUTTON intent-filter and
it then triggers my Main application. But I am not getting the choose
application dialog. Instead, both my Main application and camera
application opens.
<activity android:name="MainApp"
android:label="@string/app_name"
android:theme="@android:style/Theme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action
android:name="android.intent.action.MY_INTENT"></action>
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<receiver android:name="MyReceiver">
<intent-filter>
<action android:name="android.intent.action.CAMERA_BUTTON"/>
</intent-filter>
</receiver>
public class MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent newIntent = new Intent(".android.intent.action.MY_INTENT");
context.startActivity(newIntent);
}
}
-abhi
On Nov 14, 2:53 am, Ludwig <
ludwigbrinckm...@gmail.com> wrote:
> If you have more than one best matching activity for an intent is to offer
> you a list to pick the desired activity, with the option of using one as the
> default (ie do not ask again). It is easy to trigger, just by defining two
> activities with the same intent...Ludwig
>
> 2008/11/14 blindfold <
seeingwithso...@gmail.com>