小编Var*_*ani的帖子

Android深度链接具有多个查询参数

我正在尝试深层链接我的应用程序,并在我的AndroidManifest.xml中实现了以下内容以打开正确的活动.

<activity
    android:name=".ui.activities.MyActivity"
    android:label="@string/title_activity"
    android:screenOrientation="portrait">
    <!-- ATTENTION: This intent was auto-generated. Follow instructions at
    https://g.co/AppIndexing/AndroidStudio to publish your Android app deep links. -->
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <!-- ATTENTION: This data URL was auto-generated. We recommend that you use the HTTP scheme.
        TODO: Change the host or pathPrefix as necessary. -->
        <data
            android:host="myHost"
            android:scheme="myCustomScheme" />
    </intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)

我正在使用adb测试活动

adb shell am start -W -a android.intent.action.VIEW -d "myCustomScheme://myHost?key=category_parent_id&value=92&title=test" com.myApp.android
Run Code Online (Sandbox Code Playgroud)

Activity正在打开,但只传递给intent中活动的URI

myCustomScheme://myHost?key=category_parent_id
Run Code Online (Sandbox Code Playgroud)

它在"&"后跳过一切

我确实在SO上查找但没有找到任何有多个查询参数的东西.

任何帮助,将不胜感激.:)

android deep-linking adb

44
推荐指数
2
解决办法
2万
查看次数

Android - Firebase App Indexing App未显示在Google自动填充建议中

我想实现火力地堡应用编入索引,而更新的任务可转位是显示成功,该指数也显示在了在应用程序在谷歌应用程序搜索后标签.根据我的理解,在Google App中搜索时,索引也应显示在自动完成建议中但未显示.我从这里开始关注教程.以下是我用来索引内容的代码片段:

Indexable menuItemToIndex = Indexables.noteDigitalDocumentBuilder()
                            .setName(title)
                            .setText(text)
                            .setUrl(link)
                            .build();

Task<Void> task = FirebaseAppIndex.getInstance().update(menuItemToIndex);

task.addOnCompleteListener(new OnCompleteListener<Void>() {
    @Override
    public void onComplete(@NonNull Task<Void> task) {
        Log.d(TAG, "App index updated: " + title);
    }
});
Run Code Online (Sandbox Code Playgroud)

我正在使用的Firebase App Indexing库的版本也是

compile 'com.google.firebase:firebase-appindexing:10.0.1'
Run Code Online (Sandbox Code Playgroud)

有什么我想念的吗?我正在测试运行Stock 7.1.1和Google App版本的Nexus 6P 6.9.36.21.arm64.

android firebase firebase-app-indexing

37
推荐指数
1
解决办法
1685
查看次数