Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. Intent myIntent = new Intent(cxt, alarmView.class);
  2. myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  3.  
  4.  
  5. PendingIntent proximityIntent = PendingIntent.getActivity(cxt, records.get(pos).process,myIntent, 0);
  6. locationManager.addProximityAlert(records.get(pos).x,
  7. records.get(pos).y, records.get(pos).r, // metry
  8. -1, proximityIntent);
  9.  
  10. @Override
  11. public void onCreate(Bundle savedInstanceState)
  12. {
  13. super.onCreate(savedInstanceState);
  14.  
  15. /**** Turn the screen on and show your activity ****/
  16. android.view.Window window = getWindow();
  17. window.addFlags(android.view.WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
  18. window.addFlags(android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
  19. window.setContentView(R.layout.activity_alarm_view);
  20. /***************************************************/
  21.  
  22. /**** Rest of your code as it is ****/
  23.  
  24. /* ---------------------------- ****/
  25.  
  26. /************************************/
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement