Am using code like this for using camera app:
androidmanifest.xml:
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
StartCam.java
Intent ci = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
ci.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
.....
this.startActivity(ci);
There is a feature in moto phone when you double press power key cam app is opened and can be used even when the phone is locked.I want to implement similar feature.I want to know how this feature is implemented are they also using intent to call cam app even when phone is locked.?How the cam app is displayed and enabled for use when screen is locked?
In my app when the screen is not locked cam app will open and can be used.When screen is locked cam app will open but to see if cam app is open and to use it i need to unlock the screen.