I'm getting error:
No Activity found to handle Intent
I think I configured my manifest correctly. Is there any issue with following config?
<activity
android:name=".Lancement"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="com.example.cd.country" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
When creating the intent to launch MainActivity, make sure you use addCategory() to specify the same category that matches your manifest declaration.
Intent intent = new Intent("com.example.cd.country");
intent.addCategory(Intent.CATEGORY_DEFAULT);
startActivity(intent);
Or launch MainActivity explicitly and don't bother with an IntentFilter:
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);