How can I delay the bluetooth permission bluetooth on android app? - android

Im creating an android app, and it beggins with a zoom out transition. And it has a popup that ask the user to allow or not the use of bluetooth. The thing is i want to have a delay on that popup so the user can see the transition.

Related

How to detect user interaction with phone in flutter?

Is there any way to detect user interaction/activity with the phone in flutter?
I want to know which app the user is using or if the user is using his phone or not. I just want to know if the user's phone is in active state or not.
Yes, I know I can use motion sensors like Gyroscope and all but is there any other way to detect phone activity in flutter?
The idea is my app will be running in the background and it will track user interaction with the phone.
If the user is using his phone like playing game, watching video or any other activity then it will show me that phone/user is active.
All I found on the internet is to track activity like walking, running motion activity.
Is there any other way to track phone activeness?

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 in Android 12 to observe Camera and Mic toggle state to prevent stream blank frame or silent audio? [duplicate]

With the new Android 12 operating system, the user now has the ability to completely disable microphone and camera usage from ALL apps. This is actually a good thing, letting users easily control privacy.
If an app starts and has permission to use the microphone and the camera AND the user has disabled all access to either of these hardware, Android 12 automatically pops up an alert asking the user to re-enable the microphone or camera, or to continue with the hardware disabled for the app.
Also, on creation, the app can simply check when starting to see if the needed hardware is enabled, and can also prompt the user further or handle the condition as the app sees fit.
But what if the user disables the microphone or camera while the app is running? I can't seem to find any interfaces for something like onMicrophoneEnabled() or even a Broadcast of such an event.
It's possible to check every time onResume() is called, but I was hoping there'd be a more elegant solution.
If anyone knows of something that my app can use to capture this when the user has made changes either way, please let me know.
After carefully reading the google docs (https://developer.android.com/training/permissions/explaining-access#toggles) on their implementation of the user enable/disable of the camera and microphone I discovered something very interesting:
Apps are explicitly forbidden from knowing if the user has done any of these actions. So of course there is no way to get notified of these changes: it is by design.
If the user turns off the camera this way, the app will still get a camera feed, but it will be black. Similarly the microphone will still work, but we'll get only silence. This is a feature--a way to ensure privacy.
The operating system will remind users that they have disabled the microphone or camera and provide a chance to re-enable the hardware, which is nice. But the app is completely in the dark (hehe).
Another way to think of it: Just like putting a piece of tape over your camera or your thumb over the microphone. Only this time it's done by the operating system. This way a spy program or some other nefarious software will still think it's working and not try to bypass or give up.
This also explains why testing during onResume() or onWindowFocusChanged() didn't work either. I was getting results that didn't align with the settings (they aligned with current permissions).
So to answer my question: There is no way to be notified. That is the point.

forcibly launching an application

Is it possible somehow to force launch my application in the background on Android when:
GPS is turned on
OR
another app is opened?
What I want to achieve with this:
I have an app in which you can buy parking ticket / highway ticket etc... I want to have the location of the user as soon as it starts any navigation app so when he parks or goes to the highway I can send a notification to purchase ticket.
The app already handles locations but only if it's open.
Now it's not possible to lunch application with forcely.
After Android 6.0+ if you want to tract user location, storage etc! user must have to provide permission. Without that you can't do this.
And now for high sequrity patch, your app wont start GPS is turned on OR another app is opened. It's not possible now.
Thanks.

Can the power button be disabled while using an app?

I am making an alarm app for Android. Is there a way to disable the volume control and the phone's power button from within the app? If the app needs to ask the user for permission before doing this, thats fine.

Categories

Resources