美文网首页
由scheme导致APP图标消失问题

由scheme导致APP图标消失问题

作者: xuezhi123go | 来源:发表于2018-12-13 14:00 被阅读0次
参考文章: 由scheme导致APP图标消失问题

通过html跳转APP时需设置scheme,在html中添加跳转:

window.location.href = “cainiao://”; 

但是在打包安装后出现了APP图标消失问题,是由于同一个intent-filter设置了多个category的原因,解决方法,分两个intent-filter即可:

 <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="cainiao"/>
        </intent-filter>
    </activity>

相关文章

网友评论

      本文标题:由scheme导致APP图标消失问题

      本文链接:https://www.haomeiwen.com/subject/vyovhqtx.html