A deep Facebook link opens Google Play instead of an application (even if installed)

I’m trying to use Facebook’s “Mobile App” for Android, but I can’t understand why I need to enter the ad on my app’s installation page on Google Play, instead of opening my own app so that I can handle the intention ...

Here is what I have done so far:

1) In the section "Main application for Android" (on the page "Basics of applications") "Deep binding". Key hashes look fine, and Facebook login in my application works fine.

2) Created an ad with Power Editor and passed "myapp: // type / id" as Deep Link

3) The following intent filter is added to the main application of my application:

<intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
</intent-filter>

I also tried other filters like Dan answer here

4) By clicking on an ad on my FB feed ... At this point, I get the following in logcat if you are using a signed application (generated apk or downloaded from Play):

11-19 16:06:57.540: INFO/ActivityManager(446): START u0 {act=android.intent.action.VIEW dat=market://details?id=br.com.myapp flg=0x10000000 cmp=com.android.vending/com.google.android.finsky.activities.LaunchUrlHandlerActivity (has extras)} from pid 14923

If I enter an ad with my application installed from the IDE (IntelliJ), then I get the log below:

11-19 16:10:30.845: INFO/ActivityManager(446): START u0 {act=android.intent.action.VIEW dat=market://details?id=br.com.myapp flg=0x10000000 cmp=com.android.vending/com.google.android.finsky.activities.LaunchUrlHandlerActivity (has extras)} from pid 14923
11-19 16:10:31.055: DEBUG/Finsky(16198): [1] AppActionAnalyzer.<init>: br.com.myapp is installed but certificate mistmatch
11-19 16:10:31.085: DEBUG/Finsky(16198): [1] DetailsDataBasedFragment.rebindViews: Page [class=DetailsFragment] loaded in [2947727 ms] (hasDetailsDataLoaded? false)
11-19 16:10:31.185: DEBUG/Finsky(16198): [1] AppActionAnalyzer.<init>: br.com.myapp is installed but certificate mistmatch
11-19 16:10:31.255: DEBUG/Finsky(16198): [1] DetailsDataBasedFragment.rebindViews: Page [class=DetailsFragment] loaded in [2947898 ms] (hasDetailsDataLoaded? true)

In both scenarios, Google Play opens instead of my application. It looks like the FB application is sending Intent directly to the market, passing my application identifier, rather than following the activity class listed on the application bar. With the IDE APP installed, it looks like I can't get anything from the FB due to certificate issues ...

, , FB Intent, ? FB-, ? !

+3
2

, .

-, , :

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="myapp"/>
</intent-filter>

-, IDE ( ) .

+2

, Class Name Facebook . MainActivity com.domain.appname.MainActivity.

() .

0

Source: https://habr.com/ru/post/1528216/


All Articles