Guest User

Untitled

a guest
Jan 16th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public void inLineShowWebPage() {
  2.  
  3. String url = "https://www.google.com";
  4. Intent i = new Intent(Intent.ACTION_VIEW);
  5. i.setData(Uri.parse(url));
  6. try {
  7. startActivity(i);
  8. } catch (Exception e) {
  9. Log.d ("myError", e.getMessage());
  10. }
  11. }
  12.  
  13. public class SharedFunctions extends AppCompatActivity {
  14.  
  15. public void showWebPage() {
  16.  
  17. String url = "https://www.google.com";
  18. Intent i = new Intent(Intent.ACTION_VIEW);
  19. i.setData(Uri.parse(url));
  20. try {
  21. startActivity(i);
  22. } catch (Exception e) {
  23. Log.d ("myError", e.getMessage());
  24. }
  25. }
  26.  
  27. SharedFunctions sf = new SharedFunctions();
  28. sf.showWebPage();
Add Comment
Please, Sign In to add comment