I'm trying to use deep-linking from Google+ into an Android app, following http://developers.google.com/+/mobile/android/share/deep-link.
I can share to Google+. The link in the post is "clickable" (it highlights during touch), but does nothing on release. Also, the post contains a suspicious "undefined" line of text.
sample http://raw.github.com/concreterose/TestDeepLink/master/README_ASSETS/sample_share.png
I have enabled deep linking in Google Developers Console project credentials.
I'm using a signed-in PlusClient created with Scopes.PLUS_LOGIN, posting via:
Intent shareIntent = new PlusShare.Builder(this, plusClient)
.setText("Testing deep link")
.setType("text/plain")
.setContentDeepLinkId("deeplink",
"title",
"description",
Uri.parse(thumbnailUrl))
.getIntent();
startActivityForResult(shareIntent, 0);
I'm not sure if I need all of these, while trying to get things working I have:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
The handling activity (given as the first activity in the manifest):
<activity android:name=".ParseDeepLinkActivity">
<intent-filter>
<action android:name="com.google.android.apps.plus.VIEW_DEEP_LINK" />
<data android:scheme="vnd.google.deeplink" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
is:
public class ParseDeepLinkActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.i(TAG, "onCreate");
throw new RuntimeException("got here");
}
}
I'm building with the release keystore and testing on a several real devices running 4.4.
I've tried:
Using the PlusShare.Builder(activity)
constructor (without plusClient
), no change.
Using addCallToAction(label, uri, deeplink)
instead of setContentDeepLinkId
. There is no call to action button, and clicking the post goes to uri and not the deep link.
Triple checking "Deep linking: Enabled" is set correctly in the developers console.
Building without proguard, no change.
Uninstalling the app then clicking the link (supposed to open the play store entry), does nothing.
Signing with a different key. Plus sign in fails (as expected).
Using different versions of play services (4.0.30 vs 3.2.+).
adb shell setprop log.tag.GooglePlusPlatform VERBOSE
does not generate any log messages.
Fetching my API access token and verifying it has auth/plus.login
, it does.
Can anyone tell me what I'm doing wrong? Thanks!!
Update: This is now working, apparently fixed by a Google Play Services update.
It turns out this a known issue that will be fixed with the next Google+ update:
Google+ Interactive shares on android are broken in version 4.2.4.58179886