Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mycompany.WBV2;
- import android.content.Context;
- import android.content.Intent;
- import android.app.Activity;
- import java.util.Random;
- import java.util.*;
- import android.app.*;
- import android.os.*;
- import android.content.*;
- import android.widget.Button;
- import android.net.Uri;
- import android.net.*;
- import java.net.*;
- import android.view.*;
- import android.view.animation.*;
- import java.nio.*;
- public class MainActivity extends Activity
- {
- final Button b=(Button)findViewById(R.id.hello_worlld);
- @Override
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- setTitle("Location Generator/Viewer 2.0");
- final Button b1=(Button)findViewById(R.id.hello_worlld);
- b1.setOnClickListener(new View.OnClickListener(){
- public void onClick(View v)
- {
- Random R=new Random();
- int dub=R.nextInt(999);
- int dub1=R.nextInt(999);
- int dub2=R.nextInt(999);
- int dub3=R.nextInt(999);
- Intent I1= new Intent(Intent.ACTION_VIEW,Uri.parse(("geo:"+dub+"."+dub1+","+dub2+"."+dub3)));
- startActivity(I1);//https://www.google.com/maps/@34.0625899,-117.5636834,1692m/data=!3m1!1e3
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment