Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Intent to launch Google+ app at Google+ Community screen

There is already a good SO question for displaying a Google+ Page in the Google+ Android app:

Open Google Plus Page Via Intent In Android

But what about the Intent to launch the Google+ app at a specific Google+ Community?

EDIT - to the silent down-voters, please explain why you down-voted.

like image 720
Mark Avatar asked Apr 15 '14 06:04

Mark


People also ask

What does Android intent Action VIEW do?

An intent allows you to start an activity in another app by describing a simple action you'd like to perform (such as "view a map" or "take a picture") in an Intent object.

How to open Google Maps using intent in Android studio?

In order to launch Google Maps with an intent you must first create an Intent object, specifying its action, URI and package. Action: All Google Maps intents are called as a View action — ACTION_VIEW .

How to open map using intent in Android?

Following is my Intent code.. String url = "http://maps.google.com/maps?daddr="+address; Intent intent = new Intent(android. content. Intent.


1 Answers

My solution, working with G+ version "5.3.0.91034052", tested today

final Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse( "https://plus.google.com/communities/107847486351510098159" ) );
intent.setPackage( "com.google.android.apps.plus" );
if (intent.resolveActivity(getPackageManager()) != null) { 
    startActivity( intent );
}

It's not bullet proof, you need Google+ app on your device, in case you don't have it some kind of try-catch might be nice (?),

like image 96
outlying Avatar answered Oct 27 '22 00:10

outlying