When I open my screnn I want to make my app open. It is password application and I want that EVERY time that the screnn open the app will ask the password.
I made all the code that i need for the app but it is not working and the app does not open. I used RECEIVE_BOOT_COMPLETED:
<user-permission android:name="android.intent.category.RECEIVE_BOOT_COMPLETED" />
<application
  ...
   <receiver
      android:name="com.test.receiver"
      android:enabled="true" >
      <intent-filter>
         <action android:name="android.intent.action.SCREEN_ON" />
         <action android:name="android.intent.action.BOOT_COMPLETED" />
      </intent-filter>
   </receiver>
</application>
and here is the java part:
public class receiver extends BroadcastReceiver
{
   @Override
   public void onReceive(Context context, Intent intent)
   {
      intent = new Intent(context, MainActivity.class);
      startActivity(intent); // context.startActivity(intent); does not work too
   }
}
i will be happy if someone will help me, and if someone can say too me how acn i cancel somehow the home button i will be thanksful a lot :)
 
    