resetting phone caused apk to stop working - android

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.

Related

How to stop Google's Advanced Protection from preventing APK installation?

I'm developing a mobile application and currently, I want to check whether the app works well outside of android emulator. I made the APK, activated Developer Mode, and turned on install unknown app. I opened my APK in Samsung Galaxy Tab A and things seemed fine until I found myself a popup error.
The pop up said that Advanced Protection prevents app installation from outside of Google Play. I searched more about it, and found that Google Account has this 'Advanced Protection Program' which most definitely caused my problem.
I accessed the only Google Account in the Samsung Galaxy Tab A and indeed, the account had been enrolled in Advanced Protection Program. I unenroll the account from Advanced Protection Program, tried to install the APK again, but the very same error still appeared.
I also installed the application in other devices, such as Xiaomi and other Samsung device, and they were working fine. Another mobile device with this specific Google Account didn't have the same luck however.
Anyone knows the solution for this?

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.

Jenkins android device not found/offline

I'm using to make automatic build and releases of my android library.
One of the steps is, of course, automated testing. Since I can, I run the tests on a real device.
The issue is, I have to unplug then re-plug my device between every launch otherwise I get an error saying that my device is either not found or offline.
So the drivers are all fine since it's working the first time, but I can't figure out what's happening after that.
I'd love to be able to build and test release candidate everytime I push on develop but this is preventing me from doing it properly ;(
I tried re-installing everything with no changes. Has anyone else encountered the same issue or have a fix to this behaviour?
Thanks a lot!

Signed App cant install on low end tablet

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.

Why would Android 2.2 reboot after install of an .apk file?

I am getting reports from beta testers that after installing my .apk file their device is rebooting. After reboot the application operates as normal. Reboot after installation is not part of the desired/expected behavior, and itself sounds like a security breach.
Can anyone speculate as to why Android might reboot after an .apk install?
UPDATE:
One of the devices was an LG Ally, the other was a Samsung Galaxy Note
Are your Beta users using a rooted device? Do they have some kind of security app like "Lookout" installed on their device?
I'd suggest that you make your app create a trace log on the sdcard, that you'd get your beta tester to email to you.
Of course, this debugging process would be easier if someone loaned you the same model of the device your beta user is using.
No matter what your app should never be able to crash the operating system. A lot of this can depend on the device and manufacturer. For example, I noticed that when using a certain app to stream music on 2.3.x on the Droid X, the device would sometimes restart. I could not fix this issue myself but instead had to wait until a fix was provided by Motorola (which it eventually was). I would see if you can find a common occurrence on certain devices or manufacturers then do some researching on their reported bugs page. Also, what type of application is this (game/media/utility?)

Categories

Resources