簡體   English   中英

安裝后為什么我的應用程序未顯示在圖標網格(不是啟動器)中

[英]Why is my app not showing in the grid of icons (not the launcher) after installation

我最近開始測試我的react-native android應用程序,並注意到它在安裝時未創建應用程序圖標。 當我調試時-似乎可以安裝並正常運行,但是當我在應用程序圖標中查找啟動它時-它不會顯示。 查看已安裝的應用程序列表,它就在那里。 我該如何調試? 我是否需要將啟動模式從singleTop為其他內容? 我嘗試將其更改為singleInstance ,但仍然存在相同的問題。 如果我刪除了一些意圖過濾器,它似乎可以工作-所以也許我弄亂了branch.io安裝說明? 我是否需要為其他意圖創建單獨的意圖過濾器xml節點? https://dev.branch.io/getting-started/sdk-integration-guide/guide/react/#android-configure-manifest

AndroidManifest.xml中

   <application
      android:name=".MainApplication"
      android:allowBackup="true"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:launchMode="singleTop"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="http"
                  android:host="www.foo.com"
                  android:pathPrefix="/event" />
            <!-- note that the leading "/" is required for pathPrefix-->
            <data android:scheme="fooapp" android:host="open" />
        </intent-filter>
        <intent-filter>
          <action android:name="fcm.ACTION.EVENT" />
          <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
      </activity>

更新

拆分意圖過濾器似乎已經解決了問題-但不清楚這是否正確。 在branch.io指令中-對我來說,這是否意味着要創建一個新的Intent過濾器,而不是添加到現有的主要過濾器中?

         <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
         </intent-filter>
         <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="http"
                  android:host="www.foo.com"
                  android:pathPrefix="/event" />
            <!-- note that the leading "/" is required for pathPrefix-->
            <data android:scheme="fooapp" android:host="open" />
        </intent-filter>

啟動器通常是由各個硬件制造商開發的特定軟件。 在我擁有的所有設備上,如果未從Play商店安裝應用程序,則不會在主屏幕上安裝該應用程序,但會在應用程序列表中顯示該應用程序。 但是,這種行為將特定於您正在使用的啟動器。

盡管只需要看一下,您就不需要去設置->應用程序。 那是你的問題嗎?

屏幕截圖以及對測試設備的描述可能會使問題更清楚。

更新....

通常,啟動活動只有一個MAIN和LAUNCHER的意圖過濾器。 我只是嘗試從該Intent過濾器中刪除其他內容,看看是否可以解決問題。 然后一個接一個地添加列出的其余所有內容,直到您確定問題子代為止。

再看一遍,我不確定您是否可以在單個事件過濾器中定義2個動作。 因此,似乎您需要刪除VIEW。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM