Wednesday, October 2, 2013

Android-Filter Collision

Filter Collision

Resolving Intent Filter Collision
In the Activity Linking section, you learned that the element defines how your activity can be invoked by another activity. What happens if another activity (in either the same or a separate application) has the same filter name? For example, suppose your application has another activity named Activity3, with the following entry in the AndroidManifest.xml file:

Filter Collision

package=”net.learn2develop.Activities”
android:versionCode=”1”
android:versionName=”1.0”>
android:label=”@string/app_name” >
<! -- android:theme=”@android:style/Theme.Dialog” -- >

android:label=”Activity 2”>
android:label=”Activity 3”>

Filter Collision

If you call the startActivity() method with the following intent, then the Android OS will display a selection as shown in Figure.
startActivity(new Intent(“net.learn2develop.ACTIVITY2”));
If you check the “Use by default for this action” item and then select an activity, then the next time the intent “net.learn2develop.ACTIVITY2” is called again, it will always launch the previous activity that you have selected.
To clear away this default, go to the Settings application in Android and select Applications ➪ Manage applications and select the application name. When the details of the application are shown, scroll down to the bottom and click the Clear defaults button.

Filter Collision

Filter Collision




Upload UIImage as base64 String

Upload UIImage as Base64 String (Upload UIImage as string) //Select Pic From Camera or Gallery       @objc func btnPro...