How to hide the pop up for my application? - android

Have a look on the below pic
The foreground pop up is handsent sms app.The back ground is my app. My problem is whenever an sms received popup window opens.The bad thing is even my app runs .Their pop up box may disturb my app users.How can block their pop up on my screens. The dafault sms app is opened then handsent sms app wont show popup on the window.Like that I also want to block other popup on my app screens.

Their pop up box may disturb my app users..How can block their pop up on my screens
You don't know that. This is not something you should try to control, if the user has an app that pops up, that is probably their preference. Your app should however be prepared for interruptions, i.e handle your app's lifecycle properly

Related

How to disable "Screen is Pinned" dialog android from kiosk mode

iam developing screenlock app for android using a React Native and a little annoyed with the screen pinned dialog that always appears, is there a way to just get rid of it? so what I really want is no dialogue interaction at all with the user
enter image description here
If you're calling startLockTask() and your device isn't set up as a dedicated device with your app whitelisted, then no you can't prevent it:
Otherwise, the current task will be launched into screen pinning mode. In this case, the system will prompt the user with a dialog requesting permission to use this mode. The user can exit at any time through instructions shown on the request dialog.
The dialog is there to help users understand what's happening, give permission for the app to take over their screen, and know how to get out of it later. It's baked into Android by design, so malicious apps can't cause problems - it's just a limitation you have to deal with, unless you're working with a dedicated device (which can be set up to give apps more control and users less)
Have you thought about immersive mode instead, where you hide the nav bar? The user can get out of that too by swiping to reveal the controls, but it's less intrusive. There's no way to automatically lock the user's screen with no interaction though

Is there any way to prevent Android Dialer from going fullscreen when user is in my app?

When someone gets a call, they get a popup notification with "Answer", "Decline", etc.
When they tap "Answer", Android Dialer opens in full screen and takes them away from my app.
They can then app switch back into my app, at which point the ongoing call displays as a chat-head or a persistent notification.
I'm curious if there's any kind of setting or state I can adjust (without the user having to do anything) to make that immediately happen when they answer? That is, instead of Dialer taking them into full screen, when they tap "Answer" on the Dialer notification it just picks up the call in the background and keeps the original app in the foreground?

Bypassing dialog bug in Android

I have an application which in certain areas, a dialog pops up and restricts the user from proceeding. There are currently two types of dialogs. One restricts the user entirely from proceeding and the other allows the user to proceed if they click on "OK".
The problem:
When the dialog appears, if I close the application and relaunch it, the app bypasses the dialog and gains access to the next screen. On one of the cases, the app bypasses the screen and shows that screen which the user was previously on before the dialog appeared.
Does anyone have an idea what may be the problem?

How to force my app to the front

I have developed an android app that uses a timer with a call back. When a specific criteria has been satisfied, the app either rings or vibrates the phone depending on user settings. It will continue to ring until the user acknowledges an alert box. This all works fine. However, if the user has brought another app to the front then he may not realize it is my app causing the phone to ring and re-open it. Is there a way I can force my App to the front or at least the Alert Message to be on top of anything else?
Notifications are your friend. They wont interrupt a users workflow and with the new JellyBean apis you can put actions and other dynamic components in them.
Instead of doing that, you could just use a notification with a specific ringtone once it has been sent instead of annoying the user this way.

Android: Determine the previously displayed external Activity

In my application, I used a library that displays ads in my app. When a user clicks on the ad, it launches the Browser app, and the onClick events are handled by the library itself.
I also have a placed code in onPause() and onStart() methods that detects whether any of my Activities are sent to background (user pressed Home) or switching between any of my Activities.
So if the app is either freshly opened (no instance is running) or re-opened from background, it will display a dialog box. If the user is only switching from any of my Activites, then the dialog box shouldn't be displayed.
Now the problem is that when the user clicks on an Ad, the Browser app gets loaded and would mean that my App has been sent to background, and so when the user closes the Browser, it will still display the dialog box when it shouldn't.
Is it even possible for my App to determine the previously displayed external Activity (ie. Browser) and not display the dialog box?
Or are there better approaches that I can follow in implementing such setup?
Thanks in advance.
I don't think that there is a way for your Activity to know, which was the previous activity. A simple work-around is to save the time the dialog was displayed and not displayed it again, before some time passes. You can decide on the exact time period based on your application's requirements.
This may be in fact better in some situations. If the user switches from the Browser to your application and it has been some time he has used your application, it will be appropriate to show the dialog again.
you can use onResume() method to specify the behaviour when your activity get back from the background.

Categories

Resources