For a couple of days recently, I was able to get my (prototype) media player app to show up as a menu item and run in the Android Auto app, in the Desktop Head Unit, and on my car. This is an app built and installed using Android Studio and run on a phone in developer mode with Android Auto in developer mode with the head unit server running. Older reports on StackOverflow say that uploading to Google Play is necessary to test an app in a real car, but I did not find this to be true.
However, recently, it stopped working (on the Android Auto app and the car, have not tried DHU), and I do not understand what has changed. I suspect the issue might be related to signing my app, because it only started working when I started signing my app. The only clue I have are two cryptic messages in the log, which I also saw before I started signing the app.
I Finsky : [25252] ude.dispatchTransaction(7): PlayGearheadService <my.package.name>, app owners empty
W CAR.VALIDATOR: Package DENIED; failed all other checks [my.package.name] [CONTEXT service_id=13 ]
The problem turned out to be simple. The Android Auto app developer setting "Unknown sources" apparently was reset by an update. Enabling it fixed the problem.
Related
I've published an Android bundle on Play Store for internal testing. Now I've installed it (from Play Store) on a physical device and started. As the application is malfunctioning I want to see the logs as I did by starting debugging right from VS Code (or Android Studio for what it's worth). But I see no such possibility. I've uploaded debug symbols to the release but it didn't change anything.
On VS Code I see following options:
None of those works.
On Android Studio I tried to attach debugger to a running process (the application is running at the moment) and see no available processes on the Samsung device:
I just need to see logs, I don't need a step-by-step debugger.
So the question is: is it possible to attach a debugger to an application installed from Play Store?
Ok, for my needs I found a solution. Android Studio's Logcat shows all logs from the connected device. There I can filter out flutter tagged entries and see my application.
Only thing that puzzles me is the filtering by the package name. Each entry I see shows my package name. But if I click on it and choose Add "package:com.myapp" to Filter no entries are shown anymore. But I can live with that.
Another option is running adb logcat on my device. That's even better one
The apps were debugging on my phone before, I had uninstalled the app but it didnt fully uninstall and didnt allow me to debug, So I used adb commandline to uninstall app fully. Before I used the command line, I went into apps section in my phone settings and uninstalled "Xamarin.Support" or "Xamarin.Android" in the apps section. After that any app, (tried making a new vs xamarin file) no app will debug on my android phone now.
I have tried turning Developer settings off and on, usb debugging on and off. Tried making a new vs xamarin file. All of these debug on Android simulator and on another phone but not on mine! When I try to debug any app on my phone. It builds, takes some time. and crashes immediately after starting.
I am thinking it is the "Xamarin.Support" app that I deleted of my phone that is effecting this. Please help!
The other phone that the debugging is working on, I went into their, went into apps in settings and searched xamarin. It had "Xamarin.Android API-27..." My phone also had something similar to that but I uninstalled it accidentally, and I dont know how to get it back to make it debug on my phone if that was indeed the issue.
Background:
I am developing an Android app. When the app starts up, it checks to see if it is excluded from Battery Optimizations using the isIgnoringBatteryOptimizations() function. If that function returns false, I use the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission to show the Battery Optimizations Settings screen, where the user is expected to add the app to the whitelist.
This all works perfectly when I run the app from Android Studio. The trouble starts when I download and install the release candidates.
Note that the issue I will describe only happens on one of my two phones. The issue happens on a Sharp 507SH running Android 7.0. The issue does not happen on a Sony SOV32 also running Android 7.0.
The issue:
When I download and install the release candidates (not using Android Studio) and start the app, the Battery Optimizations screen is shown as normal. However, the app appears already listed in the "not optimized" whitelist right away. Normally the user has to manually select the app and add it. But it appears in the list. So the user presses the back button to return to the app and everything seems fine. However, the app is not actually in the whitelist. This is confirmed by the fact that the app prompts the user every time the app starts, i.e. isIgnoringBatteryOptimizations() is still returning false.
I can add the app to the whitelist "for real" by first going in to Battery Settings and removing it from the whitelist, then adding it back. Then the prompts disappear as they should.
I am late to the conversation, but I have experienced something similar to what paperduck said above.
I cannot 100% prove it, but my experience shows that when testing on an emulator and my own device (Huawei P20 Lite), with the application installed via Android Studio, the application says that it is on the Optimisation list. Adding or removing the application from the Optimisation list does not change the returned value.
This may be a side-effect (bug) of previously installing the APK on the phone outside of Google Play. We are downloading and installing APK file release candidates directly from Google Drive. The phone which had a previous APK file installed experiences this problem. The phone which has not had the APK file installed directly before is not experiencing the problem.
We haven't confirmed this. It is our suspicion.
I have been working on testing in-app billing. Through the process, I learned that I needed to reset my device so as to wipe out my personal information or google would keep complainer about me not being able to purchase from myself. So indeed I reset the device and re-active gmail with my test account only. But now, my apk refuses to work. The second I click on the ic_launcher, the app login screen shows up but then the app crashes immediately. I have been at this all night/morning. Does anyone know why that might be happening? I am using an LG P-769 with android 4.1.2. The apk works on another device that I own.
The apk in question is a released apk creating using eclipse with proguard.
In case someone else is experiencing this seemingly rare bug:
As it turned out, resetting the device deleted all my contacts. As a result my app was throwing a NPE.
Hi guys, I know most of people faced the problem same like me.
But I still cant solve this problems.
I had build android app and this app is using Google Map API and Google Places API.
I had signed my apk file using Eclipse wizard, but when I transfer it to my tab (taiwan product) using SD Card it said "application not installed". I never installed this app with debug key before. All others Google Map apps I downloaded from Play store can use well in this tab.
I set min android version is 2.2 and highest is 4.0.3. My tab running on 4.0.3.
I also tried to install this app to other brands low end tablet, and it was successful.
But in my tablet, it failed.
Anybody have idea why I can't install this signed apk file? I had tried so much to solve this.
thanks..
There comes a time in every Android user's life where you want to install an app not found in the Android Market. If it's your first time, you're greeted with, "For security, your phone is set to block installation of applications not obtained from the Android Market" message as you try to install. But how do we get there?
To allow app installs from non-Market apps, tap the menu button on your home screen, then choose Settings >> Applications >> Unknown sources.
Who are these "Unknown sources," and what do they want? Simply put, it's anything other than the Android Market. Could be an app sent by e-mail. Or downloaded from a website.
If you're worried about the security implications of allowing unknown sources, there's an easy fix -- install the app from outside the Android Market, and then hit the checkbox again to turn them back off.
source.