Whats a easy way of opening a app from my app? The app I'm building I want people to open Foursquare to check in when there at are stores. I have it that they can open the webpage. But i want to open the Foursquare app...
four.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
// TODO Auto-generated method stub
Uri uriUrl = Uri.parse("https://m.foursquare.com/nationalcleaners");
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
}
});
Updated my question with what worked for me... It will give the user a chose of using the browser or the foursquare app if it is installed on the users phone when they click on the button... After choosing browser or the app, it will bring up a search in foursquare, you can have it search what you want foursquare to search for in the "Place what your searching for hear" portion of the code below.
This is how I set it up, and it works.
Button four = (Button) findViewById(R.id.foursq);
four.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
// TODO Auto-generated method stub
Uri uriUrl = Uri.parse("http://m.foursquare.com/search?q=Place what your searching for hear");
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
}
});