r***@taom.ltd
r***@taom.ltd
  • 发布:2019-10-18 20:58
  • 更新:2020-10-13 18:27
  • 阅读:849

#插件需求# 添加对Android Shortcuts的支持

分类:uni-app

目前是支持iOS的 3D Touch,还没有支持安卓的Shortcuts,希望可以兼容,或者直接在HBuilderX通过视图设置。

效果:

原生安卓是这样写的:

<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shot_shortcut" />

<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">

<shortcut  
    android:shortcutId="shortcut_identify"    //要唯一  
    android:enabled="true"  
    android:icon="@drawable/shortcut_icon"    //快捷方式图标  
    android:shortcutShortLabel="@string/shortcut_short"   //快捷方式的短名称  
    android:shortcutLongLabel="@string/shortcut_long"         //快捷方式的长名称,优先使用长名称  
    android:shortcutDisabledMessage="@string/shortcut_disabled">    //快捷方式被禁用信息  
    <intent  
        android:action="android.intent.action.VIEW"    //  
        android:targetPackage="com.demo.shortcutsTest"    //包名  
        android:targetClass="com.demo.shortcutsTest.MainActivity" />    //具体要跳到的类  

    <categories android:name="android.shortcut.conversation" />  //目前只有这个categories分类  
</shortcut>  

<!--每个应用最多可以注册5个Shortcuts-->  

</shortcuts>
————————————————
版权声明:本文为CSDN博主「kinpowoo」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/kinpowoo/article/details/80842665

2019-10-18 20:58 负责人:无 分享
已邀请:
林逸

林逸

同样求支持

TTOOMM

TTOOMM

同求

该问题目前已经被锁定, 无法添加新回复