How to troubleshoot app not working for one user? - android

I have a user that has the identical phone to mine, Samsung Galaxy 5S. I download my app and install it to my phone just fine, app works as its supposed to. When my user downloads it, it appears to install correctly but when she opens the app she sees the splash screen and then the screen goes blank.
Identical phones, same version of the app...but because the app is compiled already I can't troubleshoot the app on her phone via Chrome Inspector.
How else can I troubleshoot what is going on here...I am worried its my app causing this but since its installing on my phone and others just fine I am hoping its just something specific to her phone.

Related

Android app appears in Battery Optimizations whitelist, but is not actually there

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.

Testing Android app on real device with IntelliJ IDEA

I'm a bit confused as to how testing on a real Android device works. I hooked up my device (Samsung Galaxy S4) and set the app to run on it, and it works fine. Then I make some changes, and click 'Run' again... but that just brings up the old copy of the app (prior to my changes). Currently the only way I know how to get the updated version of the app on my device for testing, is to manually uninstall the app via Settings before clicking 'Run' again.
Is there a way to shortcut this process and have my updated copy of the app replace the old copy each time I run it?

resetting phone caused apk to stop working

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.

App Inventor app works in emulator, but not on my actual phone

I've got an app inventor app built and working pretty well in the emulator. When I put it on my phone none of the code runs. The app doesn't crash, but the code behind the objects doesn't do anything. I've got code which runs on screen load which doesn't fire, and my buttons don't do anything.
The drop downs show the menu item, but that's it.
Does anyone have any ideas?
Have you connected the phone with the Block Editor Open? Can u see live preview of the app being developed?
You need to install a small application "AppInventorPhoneApp" to the phone in-order to accomplishing this... Usually this will be installed when you connect the phone first time with your BlocksEditor...
Just connect the phone to the Blocks Editor. Blocks editor will automatically install this application. Then you can see the preview in Phone.
Click Download apk from app inventor. Then Click, Package for Phone--->Download To Connected Phone.
I hope this solves your issue.
Check if unknown Sources and Development options are turned on in the Application settings.... For an application to run without these, you have to sign it. (I am not sure about this)..

How do I get the .apk url of an android app in the market?

I have an HTC buzz, which has a smaller screen (QVGA) than most android phones. Now there is an application (hyves) which is in the market but when I scan their QR code or try it via appbrain it keeps saying Not Found. A frien of mine (who now is in belgium) has a G1 and I've copied the APK when he installed hyves. The app itself works fine just the icons are a little to large, but that is not annoying.
Now the problem, there is an update, and I cannot install it via the normal way. Is there a way to get the download URL of an APK in the market (via cyrket or so)? I can try to sniff my network when the phone trys to get an app but I'm not sure how to do that and if that would work...
It happened to me with Angry Birds.
You can try to:
Install the android simulator
with a modified ROM that has the
market installed (here it is how to
do it).
Install in the simulator the application you can't install in your phone
Update it with market whenever there is an update
Share the APK with Dropbox or mail it, transfer to you PC or whatever is fine for you
Download and install the new version in your physical phone
The thing is that this application probably has some specific market filters enabled, so the market hides it from you. For example this app may decide (and report that to Android Market) that it shouldn't be run on QVGA screens, or that it shouldn't be run on your phone's Android version, etc etc. And for that reason Market won't show it to you.
But at the same time it finds itself suitable for your friend's phone, so it shows there.
So I guess whichever url you use - it won't help, market won't show it to you anyway.
The only option for you to install it is to find apk somewhere and install manually. Just as you did. And you'll have to repeat it for each and every update :)
So, find updated apk file ;)

Categories

Resources