Can not install a "Launcher" app on Android Box device - java

I am developing an Android app which has the android.intent.category.HOME intent filter in AndroidManifest.xml.
The same app installs without an issue on a spare Android 7 device that I have in hand, but won't install on my Android 9 TV Box -- until I remove the said intent filter from the manifest.
I'm getting an INSTALL_PARSE_FAILED_MANIFEST_MALFORMED failure on ADB, with the following message:
Don't allow install The third Launcher
I guess the exception somehow comes from the PackageParser.java, but I don't know where exactly.
If I remove the launcher (i.e. HOME) intent filter from my manifest file, the app installs successfully without any failures.
Looking through similar SO answers yielded no results, and Google suggests issues with OEM builds.
The question is, how can I investigate and solve this issue?
UPDATE: I can confirm that this limitation is sadly put into effect by the Chinese device manufacturer.
P.S. This seems to be a common issue with these Android TV boxes, found here and here.
Also, as a workaround, if I manually replace the installed /data/app/*.apk file with another build that has the HOME intent filter, the application can work as a launcher just fine. This actually shows that the issue is with the PackageParser, not the installation itself.

Related

Why I'm unable to install application in my phone. Redmi 7s Connected already but it's not showing to install application in Android Studio. Why?

Android Studio Not Showing My Phone for Run Application:
I want to run my developed application directly on my phone but I'm unable to run this. Because It's not showing in android studio. It also not working on emulator also. I already ready Google Development Guidelines(https://developer.android.com/studio/run/oem-usb.html). But these are not working for my system.
Have you enabled Developer mode on your phone?
If you haven't done yet follow these steps:
Go to settings -> About phone.
Tap on Build number 7 times and the developer option will be on.
If you have already enabled it then:
Go to Settings and find Developer options.
Check whether it is enabled or not.
Swipe down and find USB debugging. This option should be enabled. (Also enable Wireless ADB debugging if you're running app wirelessly)
Sorry for the late answer
I am also facing this issue couple of month ago, I had checked that I had enabled the USB debugging in developer but there is an issue with the Redmi phones that along with the USB debugging you will need to do the following
Go To Settings > Additional Settings > Developer Options
Enable USB debugging
Enable Install via USB
Disable Turn on MIUI optimization
On Select USB configuration select MIDI or File transfer (this is
what solved the problem for me)
also, keep in mind to give an RSA permission
you also check the link https://developer.android.com/studio/run/device?hl=ro
I have solved my problem on my own. The problem was in Android SDK. I'm using 2 windows in my same pc so I just used android studio on my another window then it's was working perfectly so I thought i have to try with changes that windows Android/Sdk folder in other windows which one I had problem. So I just copy (C:\Users{MyUserName}\AppData\Local\Android\Sdk) in getting the problem window and try again the android studio & Wawu... It's starting working. I hope it's will be helpful for you also.

Update an pre-installed Android App without Google Play and not to be detected as an unknown source

I'm currently working on a specific Android app that might not be able to be uploaded to Google play due to some commercial considerations (But will be built in our customized ROM)
And now we've found some ways to update the app without Google Play, but still those solutions will lead to a dialog that asks user to allow installing apps from unknown sources, however showing the dialog and changing the configuration might not be a favorable option for our project.
I've referred to this before
How to push updates to preinstalled apps without allowing installation from unknown sources
Unfortunately our app cannot be built as a system app, so this solution might not be helpful.
So is it possible to update a pre-installed app without Google Play and also not to be detected as unknown sources(Or not be asked by the system)? Thx

Android app is not running on other device

i just made a simple android app with 6 buttons. Each button on click opens a new activity. I installed the app on my device via USB cable from Android studio and it runs fine on my device.
But here rises the problem, when I installed the app on my friends device after sharing via SHAREit the app installed on his device but did not run.
What could be the reason for this? And how can I solve this?
Please help. Thank you
You dont need to create a signed APK if you only want to test it on your friends device and not to run it in a production progress. Android Studio creates an apk automatically which is signed for 365 days. Just open your project in your explorer and go to [ProjectName]\app\build\outputs\apk and select the app-debug.apk.
Make sure instance run in android studio is disabled.
Because if Instance run is enabled when you debug the app on real device through usb debugging it will work properly . but if u share the apk from your device to other device it will not work. It might show an error . App Name Unfortunately Stoped.
If Instance run is enable. you must disable the instance run first. If you don't know how to disable it just google it. After disable the instance run, you must clean project and Build new apk. It will work on all the other devices without generating signed apk.
Hope it may help you.
While building the app what MinSDK version you defined? Do both devices satisfy that criteria?
If you suspect that installing through sharing app is a problem then try attaching your friend device to your laptop and try running the app.
Or
Send the apk through email and let your friend download the apk and install the apk through apkInstaller app.
I have a solution for you:
Install Bluestacks Android Emulator.
Go to Tools, Android and click on Enable Adb Integration to disable it.
In android studios one Android Device for Bluestacks will appear while installation.
Share the installed app through shareit.
It will work on other device.
Hope it helps
Here is the link, where you will find your solution. https://developer.android.com/studio/publish/ check the point 'publish your app', In left column.
Simply follow these steps:
Double click on shift and search for build apk and click on it.
Locate that apk file.
Copy to your physical device or your friend's device... whatever, it will work.

How can I get the newest version of google play services on an AVD?

I'm trying to develop an Android app that has a native Google Maps control. Seems simple enough, but unfortunately I've run into a lot of trouble setting it up.
I have very carefully followed the instructions here multiple times with no success. Every time I try to load up my app, I get the message <my app> won't run without Google Play services, which are not supported by your device. I have confirmed in the settings that I do in fact have Google Play services on the device.
I have tried to uninstall and reinstall downloaded google services apk's, but abd does not allow me to uninstall it with the error DELETE_FAILED_INTERNAL_ERROR, I assume it is because I don't have root access.
You need to update your SDK and install the latest Google Play Services library under "Extras" section. The AVD can be launched using "android" binary under your SDK tools folder.
So I found the answer to my own question. I made a dumb mistake...
In my manifest, I entered my api key where it says API_KEY: android:name="com.google.android.geo.API_KEY but it should just be API_KEY. Changing this, and using Google Play services 9 instead of 10 fixed it.

App isn't running in Genymotion

When I press run and choose the device (I'm using Genymotion) it says everything went right but nothing shows up.
I also get this error message.
What should I do?
On your device go to Settings > Application.
Probably you have the app still installed for other users.
Try to find it and remove the app for all the users.
If the problem is this one you will find that app at the end of the list (in Settings > Apps > All)
All the apps marked as Not installed are still there, you can not install the same apps with Android Studio until they are there
NOTE: I haven't already had this problem personally, but I think if you click Yes in that dialog menu it should automatically remove your app/
If not, please try to follow above steps.
Hope it help

Categories