Could not identify launch Activity: Default Activity not found

For main activity in your manifest you have to add this with category LAUNCHER (First Activity on launch app): <activity android:name=”.MainActivity” android:label=”YourAppName” android:theme=”@style/AppTheme.NoActionBar” > <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> </activity> For other activity you have to change category to DEFAULT: <activity android:name=”.OtherActivity” android:theme=”@style/AppTheme.NoActionBar” > <intent-filter> <action android:name=”package.OtherActivity” /> <category android:name=”android.intent.category.DEFAULT” /> </intent-filter> … Read more

Android – Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23

From official documentation : To enable Google to crawl your app content and allow users to enter your app from search results, you must add intent filters for the relevant activities in your app manifest. These intent filters allow deep linking to the content in any of your activities. For example, the user might click … Read more

Android “single top” launch mode and onNewIntent method

Did you check if onDestroy() was called as well? That’s probably why onCreate() gets invoked every time instead of onNewIntent(), which would only be called if the activity is already existing. For example if you leave your activity via the BACK-button it gets destroyed by default. But if you go up higher on the activity … Read more

Debugging a service

Here’s what you can do in four steps: First: In the first interesting method of your service (I used on create): /* (non-Javadoc) * @see android.app.Service#onCreate() */ @Override public void onCreate() { super.onCreate(); //whatever else you have to to here… android.os.Debug.waitForDebugger(); // this line is key } Second: Set break points anywhere after the waitForDebugger … Read more

customize check box preference

There are two ways to achieve what you need, first is to define custom checkbox layout custom_chexbox.xml at res/layout: <?xml version=”1.0″ encoding=”UTF-8″?> <CheckBox xmlns:android=”http://schemas.android.com/apk/res/android” android:id=”@+android:id/checkbox” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:focusable=”false” android:clickable=”false” android:button=”@drawable/android_button”/> Then you need to specify this layout for the preference: <CheckBoxPreference android:key=”@string/Drop_Option” android:title=”Close after call drop” android:defaultValue=”true” android:widgetLayout=”@layout/custom_checkbox”/> Second way is to create a custom … Read more