I am trying to build a monitoring app using LUA in corona labs. I was wondering how I would go about doing that.
Background: the app should notify the user when there is another app or outside third party accessing the camera/microphone.
I'm thinking trying to get access to the devices resource manager and it notify the app when the camera and microphone is being used.
I haven't come across anything like this before. Am I on the right path? Or am I way off? How would you go about doing this?
I'm not expecting a definite answer, just a nudge in the right direction :)
In general this kind of behavior is not what Corona is designed for. You would likely have to use native tools, or Corona native if you want to use corona for your UI, to access this kind of data.
There is an interesting discussion about how it can be done in Android here How to check whether microphone is used by any background app, hope it helps!
Related
I have a Xamarin forms app that starts some processes to run a Bluetooth communication in the background.
The app works normally when it is sent to the background.
When I get it back in the foreground it kind of opens again and I don't know how to manage this situation.
When I press back for a split second I can see the previous instance of the app before it shuts down.
Any clue would be very much appreciated.
Thanks in advance!
Shiny is a robust new nuget package that makes managing backgrounding easy. Its a pretty complicated thing to do otherwise if you want to do it properly. The Nuget package also supports Bluetooth
The developer of Shiny also an MVP, Allan Ritchie presented Shiny at the Toronto. Net mobile developers meetup event, here's a video of it.
There's also a lot of examples for Bluetooth usage here. As you can imagine, Bluetooth & Backgrounding are two separate behemoths by themselves, so this helps unify and simplify them.
That said, he needs help with documentation, so please feel free to update us with how you used it!
I'm creating an app to be used during emergencies and it's important that the app can be started from the lockscreen. Is this possible(it seems to be posssible, since i see apps like this on the Google Playstore) and how would i achieve this?
You might be better off replacing the lock screen. You'll have more control and be able to provide a better user experience. Downside is you have a lot of code to write.
See this:
Creating an Android Lock Screen App.
Making a lock screen widget was possible in between android 4.4.2 until android lollipop. All other version do not have this ability. As such the best alternative would be for your app to replace the built in launcher and create its own lockscreen which you would be able to customize yourself.
Is it allowed in Android that developers can access the activities of other apps? For example, can my app get triggered when some other app is put from foreground to background or the other way around?
I checked some websites, they mostly talked about how to manage the activity of your own app....I've read someone's article saying there was an API allowing developers to monitor other apps but it was banned after Android5.0.
So please help! I really have no idea if it is possible...Thank you!
Not without access to the framework can you do this. Android was meant to have isolated processes so that this can be avoided. The only thing you can do is launch someone's else's activities should they follow certain criteria. But once it is launched, its under the process of the app you launched, not yours. You should NEVER be able to take control of someone else's process unless they allow you to via some hooks.
One hacky and error-prone ways is to monitor logs and check which activities are launching.. but this is horribly inefficient.
Have a look at my answer here # https://stackoverflow.com/a/35594313/529691
I would make an application that handle the volume buttons when screen is off. The goal would be to turn on or off the front LED.
I know that there many topics here that talk about it, but the recommended solutions (like PARTIAL_WAKE_LOCK) seem to be energy intensive and drain the battery very quickly!
What I want is a solution that is as energy efficient as possible. Is this possible? Maybe some kind of hooking?
Please note that the solutions based on scheduled tasks can not be envisaged for this project because I want detect keys in real time (or close to it)!
Take a look at this question.. if you already haven't ..
Just to make one thing clear. If something is not documented in API docs of android then any hack or workaround you find won't be reliable as Google may decide to change things in future releases, for example there is nothing documented about creating shortcuts after the app is installed ! But Since Android source code is available, developers took that piece of code as how was playstore creating shortcuts.. but its not documented so Google may change it in future !
I want to make a security app for Android phones. Basically, I don't want anyone to be able to un-install it without having to enter a specific password first.
Also, is there a way to prevent the app from being stopped manually (like being closed via. Taskmanager) etc?
This sounds more akin to Malware-like behaviour than that of a regular Android application, anyway:
For a regular Android application, I'd imagine that making it 'uninstallable' is near enough impossible to achieve - try to contemplate what the state of the Android app market would be like right now if this were possible!
On the other hand, if privileged control (root access) was available then this might be a possibility - an example of that could be like how wireless carriers implement bundled software. However, like I mentioned, there is no regular avenue available for applications released via. the Android market to achieve what you've asked, it should be pretty clear to you why...