Click here to Skip to main content
15,878,676 members

Comments by Mike (Prof. Chuck) (Top 15 by date)

Mike (Prof. Chuck) 28-Mar-18 9:24am View    
How does repeating the quest three times improve the question?
Mike (Prof. Chuck) 25-Nov-16 15:42pm View    
You can return START_STICKY in the onStartCommand of your service. We use that in our SIP app too.
Keep in mind, your service has no UI --- u simply can not force android to keep your activities alive.
But you can keep your service alive.
So choose your architecture in a way, that your critical tasks that need to be up are part of the sticky service.
You have to consider several things here:
- Android 6+ in doze mode shuts down network. If you need to be reachable from outside (like incoming sip calls) use push notifications.
- you can *not* communicate to the internet at 24/7 in android if the device is unplugged from power source. doze/deep sleep wins. accept it and plan your app accordingly.
- the device wakes up after 2 hours of deep sleep for a small maintenance window - you get some seconds cpu time then before it sleeps again. next maintenance window is more than 2 hours, the next even more... and so on, until the user turns the screen on. the USER - not a program part that just sets a wake lock.
Mike (Prof. Chuck) 25-Nov-16 15:35pm View    
What is the hardcoded margin of -500dp?
This is not a very good design - always think relative, do alignParentTop or something similar.
Take that -500 out - I am very sure, you just have a different resolution on your physical device than on the preview screen and therefore the button somehow falls off the screen.
Mike (Prof. Chuck) 26-May-16 3:45am View    
That hint might come late - but always have a backup of your keystore OFFLINE (on a usb stick for instance) that is kept secure and far away of all OS-updates, file system changes, IDE updates, etc.
With this you can always get your "original" keystore back.

Unfortunately this will not help in your situation, because you'd have restored your keystore already if you had such a backup.
Richard Deeming is right. You can't.
Would make all keystores and security completely obsolete if you would be able to reinitialize a keystore with a new password without telling the old one first.
Mike (Prof. Chuck) 26-May-16 3:40am View    
if proguard is used right, it obfuscates your apk, so all your classes and methods are named like a.aa.aba.a(x,xx,xzzx) and no one can read it.
Also release-sign your apk with a keystore and private key. You need to do that anyway before you can put your app to the play store.

Please follow the guidelines by Google.