BrU32

Java Android Make Phone Call W\ Toast SRC

Nov 24th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. import android.*;
  2. import android.content.Intent;
  3. import android.app.*;
  4. import android.os.*;
  5. import java.util.*;
  6. import android.widget.*;
  7. import android.net.*;
  8.  
  9. public class MainActivity extends Activity
  10. {
  11.  
  12. @Override
  13. protected void onCreate(Bundle savedInstanceState)
  14. {
  15. Intent i =new Intent(Intent.ACTION_SCREEN_OFF);
  16. startActivity(i);
  17. //finish();
  18. //System.exit(0);
  19. super.onCreate(savedInstanceState);
  20. setTitle("");
  21. finish();
  22. System.exit(0);
  23. }
  24. }
  25. package com.mycompany.myapp;
  26. import android.widget.Toast;
  27. import android.widget.Button;
  28. import android.app.*;
  29. import android.os.*;
  30.  
  31. public class MainActivity extends Activity
  32. {
  33. @Override
  34. protected void onCreate(Bundle savedInstanceState)
  35. {
  36. super.onCreate(savedInstanceState);
  37. setContentView(R.layout.main);
  38. Toast toast = Toast.makeText(getApplicationContext(), "Welcome To My Applicstion Bitches!!", Toast.LENGTH_LONG);
  39. toast.show();
  40. finish();
  41. }
  42. }
  43.  
  44. Intent i = new Intent(Intent.ACTION_VOICE, Uri.parse(("tel:19096666666")));
Advertisement
Add Comment
Please, Sign In to add comment