Creating a default launcher app for Android Not Working - android

I created a default launcher app for an Android TV box that used to work until I ran into some unexpected issues and had to reset the TV Box to factory default. Now it doesn't work anymore. I used to get a "Select Default Launcher" popup when pressing back from my app, but not anymore.
My Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="gensys.firefly.fireflyhikviewer">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />-->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/Theme.FireflyHikViewer">
<receiver
android:name=".Service"
android:enabled="true"
android:exported="true"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<activity
android:name=".MainActivity"
android:banner="#drawable/banner"
android:icon="#drawable/icon2"
android:label="#string/app_name"
android:logo="#drawable/icon2"
android:screenOrientation="landscape"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<!--<category android:name="android.intent.category.LEANBACK_LAUNCHER" />-->
</intent-filter>
</activity>
</application>
<!--<uses-feature
android:name="android.software.leanback"
android:required="true" />-->
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
</manifest>
I also updated my Android Studio to 4.2.1, so I don't know if that might have changed something.
Please help.

Related

Launch my App Activity on Home key pressed

I am developing a Launcher app for Android TV and want to override the functionality of Home button. I want to bring my Application's Activity to top when Home button is pressed so that it acts as default launcher. I tried this Android Studio TV remote buttons but did not work. It is definitely possible because there are button mapper apps on the PlayStore. I have this in my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_TV_LISTINGS" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.action.LAUNCHER" />
</intent>
</queries>
<application
android:name=".AppName"
android:allowBackup="true"
android:banner="#mipmap/ic_launcher_round"
android:fullBackupContent="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/Theme.AppTheme">
<activity
android:name=".AppActivity"
android:excludeFromRecents="true"
android:exported="true"
android:launchMode="singleTask"
android:stateNotNeeded="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER_APP" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.MONKEY" />
</intent-filter>
</activity>
<receiver
android:name=".broadcast_receivers.PackageChangeReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_CHANGED" />
<action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
</manifest>
any leads are appreciated. Thanks.

Android TV App not displaying in Google Play Store

Below is my manifest file, I have included all the necessary code as per the document but still the app is not displaying in the play store search. I searched using the appId for my Alpha build using my test account which i have included in the tester list.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.package">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<application
android:name=".TestApp"
android:allowBackup="true"
android:banner="#drawable/logo"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<receiver android:name=".BootReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:directBootAware="true">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="android.intent.action.REBOOT"/>
</intent-filter>
</receiver>
<activity
android:name=".activity.MediaActivity"
android:theme="#style/Theme.AppCompat"
android:launchMode="singleInstance"/>
<activity
android:name=".activity.CodeActivity"
android:theme="#style/Theme.Leanback">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.CodeAndroidStickActivity"
android:theme="#style/Theme.AppCompat">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I tried setting the android.software.leanback field to both true and false, but still not getting displayed
In your app manifest, you must declare that a touch screen is not required, as shown this example code; otherwise, your app won't appear in Google Play on TV devices.
<manifest>
<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />
...
</manifest>

No Launcher activity found cant find the solution

when i run my app on my phone it gives me this error No Launcher activity found!
The launch will only sync the application package on the device! I looked at some of the similiar questions but i still cant seem to figure out what the problem
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.soloinc.meip"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:name="com.soloinc.meip.view.VideoRecorder"
android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation|screenLayout"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.soloinc.meip.webpage.Webview"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden" />
<intent-filter>
<!--Viewer filter-->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<!-- DEFAULT LAUNCHER filter-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!--custom filter-->
<intent-filter>
<category android:name="com.soloinc.meip" />
</intent-filter>
</application>
</manifest>
Please write the following specific to some Activity
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
For example in your case
<activity android:name="com.soloinc.meip.view.VideoRecorder" android:screenOrientation="landscape" android:configChanges="keyboardHidden|orientation|screenLayout" android:windowSoftInputMode="stateAlwaysHidden" />
<!--Viewer filter-->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<!-- DEFAULT LAUNCHER filter-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!--custom filter-->
<intent-filter>
<category android:name="com.soloinc.meip" />
</intent-filter>
</activity>

IBM Worklight - How to disable splash screen?

I'm using worklight for my mobile app project. My question is how to disable splash screen in android manifest?
This is my android manifest.
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rmbp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="18" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- Push permissions -->
<permission
android:name="com.rmbp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.rmbp.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:debuggable="true"
android:icon="#drawable/icon"
android:label="#string/app_name" >
<activity
android:name="com.rmbp.rmbp"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.rmbp.rmbp.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Preference Activity -->
<activity
android:name="com.worklight.common.WLPreferences"
android:label="Worklight Settings" >
</activity>
<!-- Push service -->
<!--
In order to use the c2dm library, an application must declare a class with the name C2DMReceiver, in its own package, extending com.google.android.c2dm.C2DMBaseReceiver
It must also include this section in the manifest, replacing "com.google.android.apps.chrometophone" with its package name.
-->
<service android:name="com.rmbp.GCMIntentService" />
<service android:name="com.rmbp.ForegroundService" />
<!-- Only google service can send data messages for the app. If permission is not set - any other app can generate it -->
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.rmbp" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.rmbp" />
</intent-filter>
</receiver>
</application>
</manifest>
Check my repo: https://github.com/datomnurdin/worklight-mobile
Thanks a lot in advance.
Move this block:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.rmbp.rmbp.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
to the activity which you want to start first. Intent filter will mark this activity as default for start from launcher.
For example:
<activity
android:name="com.rmbp.SplashScreen"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_splash_screen"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.rmbp.rmbp"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.rmbp.rmbp.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

IO Exception processing: 26

I used debug.keystore as well as a new keystore but i keep getting the same error. i saw numerous posts about this problem but could'nt find any solution.
this is my map.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="07QY1V71kePjxTjGCtnM7cgrccxWizYevUYKFig"
android:clickable="true" >
</com.google.android.maps.MapView>
</RelativeLayout>
this is my manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bombil.aawaz"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="10" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
android:name="com.bombil.aawaz.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.bombil.aawaz.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- Network State Permissions to detect Internet status -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<uses-library android:required="true"
android:name="com.google.android.maps"></uses-library>"
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.bombil.aawaz.Registration"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name = "com.bombil.aawaz." />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name="com.bombil.aawaz.TraceLocation"
android:label="#string/app_name"
>
<intent-filter>
<action android:name = "com.bombil.aawaz.TraceLocation" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name="com.bombil.aawaz.HelpMe"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name = "com.bombil.aawaz.HelpMe" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name="com.bombil.aawaz.HelpAlert"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name = "com.bombil.aawaz.HelpAlert" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.bombil.aawaz" />
</intent-filter>
</receiver>
<service
android:name=".GCMIntentService">
</service>
<activity
android:name="com.bombil.aawaz.AlertWidget"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
>
<intent-filter>
<action android:name = "com.bombil.aawaz.AlertWidget" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
Thanks in advance..
Solved , debug key just works during debugging through eclipse , while when u want to use the apk u need to use release key. Also release key does'nt work in debugging mode.

Categories

Resources