So I have been searching for a while and I would just like to know how to make an app lock or a phone lock with a press of a button. I want to install a custom button to lock my phone instead of using the phone lock button. I want to make my own custom program to do this.
I have researched many places but I cant find anything.
The API for locking the phone is not public in iOS. Hence, there is no way you can achieve this in iOS.
For Android, have a look at this,
How to Lock/Unlock screen programmatically?
There is no such a way to make your own custom phone lock button. In iOS it is not possible but if you want to do that in android just look this URL:
http://androidsourcecode.blogspot.in/2013/08/android-home-screen-widget-temperature.html
Related
I have an activity in my app that has a counter for 2 different teams, now, to add a point to this teams I need to click a button.
I want to do this also with a voice command.
The thing is that I need: offline voice recognition, add points but not restart the activity, wait continuously for another voice command, only work in one Activity.
And the language will be Spanish.
Do you know any way to do this?
I have been searching and find PocketSphinx, but I don't know if this is the best option.
Finally I did it, and YES, is posible with PocketSphinx.
I had to edit the code but this page was very helpul.
I am developing an android application and i need clear the data of another application upon clicking an button.
i.e.: if i click button name "gmail" in my app,the data should be cleared of that "gmail" app
doubt:
1.Is it possible?
2.Do we need to be rooted our android device in order to do this?
° because greenify works with root access to force stop the other app flexibly.
I know that greenify works without root but pop that "force stop" ui screen of each single app to do that action.
MY APP FUNCTIONALITY:
I just wanted to develop an android apllication named "anti-theft cloud apps"
simply if an thief stols our mobile then my app detects when he changes the sim or an unique code send by mobile owner through sms from other mobile and logouts all the cloud based applications like gmail,google photos etc to protect our data to be stolen ,so in order to do that i thought of clearing other apps data(like gmail) PROGTAMITICALLY to logout. Is it possible
This is not possible with stock Android. You can do it with superuser, access root/data/data/PACKAGE and clear its content. But as seen in comment, this seems like evil thing.
I am now building a VoIp Android app and I'd like to show the incoming call screen over the lock screen even though the app is closed.
Exactly like WhatsApp.
I tried many solutions but they are all old and the APIs for PowerManagerand other APIs are deprecated in Android 6.0+.
Can anyone tell me the best solution?
I want to save as an image which is on android mobile screen at 10 sec time interval. Which may be home screen or menu screen or any thing. Can anybody tell me how i can achieve this?
I got success for my own application but its not capturing menu screen as an image.
Unfortunately, on most devices it's not possible to get the snapshot of the device outside your application. This, obviously, for security reasons.
This could be achieved accessing the frame buffer at /dev/graphics/fb0, but normally you don't have the permissions to read that.
You need to have a root access to achieve this. Write a background service and execute "/system/bin/screencap" to get the screenshot. Check this answer to find out how to get screenshot and store in sdcard.
Alternatively you can use Android Screenshot library to get screenshots on a non-rooted phones but it requires your phone to be connected to your desktop using ADB.
I want to make a lock screen application. When the phone is in the lock mode, it will turn off the phone while the USB is plugged for prevent other users from accessing the phone data. Does anyone know how to turn off Android devices programmatically so other people can't access the data while a device on the lock mode?
here's the code to lock the home button on the lock screen activity:
#Override
public void onAttachedToWindow()
{
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
super.onAttachedToWindow();
}
It is impossible with the public Android SDK.
Yes it is possible,
Using making system application(Using firmware) not download application.
You can get the code for power off android device from AOSP.
This is what can provide you an insight of the OS you are working on , and not about developing an app that would run on any device, as you have not made OS's for them.
Just pull a branch of android , customize it according to your wish and in your mainfest remove the filters, permissions that don't allow you to do that, or add your owns. Now , you have to play with the battery if I talk of more depth.
But if you just want to trigger the click on power off then its far
simpler then.