Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void inLineShowWebPage() {
- String url = "https://www.google.com";
- Intent i = new Intent(Intent.ACTION_VIEW);
- i.setData(Uri.parse(url));
- try {
- startActivity(i);
- } catch (Exception e) {
- Log.d ("myError", e.getMessage());
- }
- }
- public class SharedFunctions extends AppCompatActivity {
- public void showWebPage() {
- String url = "https://www.google.com";
- Intent i = new Intent(Intent.ACTION_VIEW);
- i.setData(Uri.parse(url));
- try {
- startActivity(i);
- } catch (Exception e) {
- Log.d ("myError", e.getMessage());
- }
- }
- SharedFunctions sf = new SharedFunctions();
- sf.showWebPage();
Add Comment
Please, Sign In to add comment