Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deep link shares to Google+, but link does nothing

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.

like image 366
Darrell Avatar asked Dec 20 '13 02:12

Darrell


People also ask

What is the difference between a link and a deep link?

If user clicks youtube app then the link is processed in the you tube app . Deep link is a link that make the android OS to search the suitable app which is capable to process the text/link and if more than 1 found means it ask to select which is want. We can make our app will use deep link.

How do I access a deep link?

Adjust Deeplink Generator To use the tool, log in to your Adjust dashboard and open the Menu, where you'll see the 'Deeplink Generator' as an option. Click to open, and you'll find a page to input the information required to create your deep link. Then simply copy and paste into whichever campaign you've set up.


1 Answers

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

like image 126
Darrell Avatar answered Nov 15 '22 03:11

Darrell