1***@qq.com
1***@qq.com
  • 发布:2024-05-16 11:32
  • 更新:2024-06-03 11:23
  • 阅读:123

【报Bug】unipush1.0 安卓手机可以收到离线通知,但是点击通知收不到click监听; 在线是可以收到通知并且能监听到click

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: windows10

HBuilderX类型: 正式

HBuilderX版本号: 3.8.4

手机系统: Android

手机系统版本号: Android 12

手机厂商: 小米

手机机型: 小米11

页面类型: vue

vue版本: vue2

打包方式: 离线

项目创建方式: HBuilderX

示例代码:
AndroidMainfest.xml  

<activity  
android:name="io.dcloud.PandoraEntry"  
android:configChanges="orientation|keyboardHidden|keyboard|navigation"  
android:launchMode="singleTask"  
android:hardwareAccelerated="true"  
android:theme="@style/TranslucentTheme"  
android:screenOrientation="user"  
android:windowSoftInputMode="adjustResize" >  
<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:host="io.dcloud.unipush" android:path="/" android:scheme="unipush" />  
</intent-filter>  
</activity>  
<activity  
android:name="io.dcloud.PandoraEntryActivity"  
android:launchMode="singleTask"  
android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard|smallestScreenSize|screenLayout|screenSize|uiMode"  
android:hardwareAccelerated="true"  
android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"  
android:screenOrientation="user"  
android:theme="@style/DCloudTheme"  
android:windowSoftInputMode="adjustResize">  

        <intent-filter>    

            <category    
                android:name="android.intent.category.DEFAULT" />    

            <category    
                android:name="android.intent.category.BROWSABLE" />    

            <action    
                android:name="android.intent.action.VIEW" />    

            <data    
                android:scheme="h56131bcf" />    
        </intent-filter>    
</activity>

操作步骤:
AndroidMainfest.xml  

<activity  
android:name="io.dcloud.PandoraEntry"  
android:configChanges="orientation|keyboardHidden|keyboard|navigation"  
android:launchMode="singleTask"  
android:hardwareAccelerated="true"  
android:theme="@style/TranslucentTheme"  
android:screenOrientation="user"  
android:windowSoftInputMode="adjustResize" >  
<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:host="io.dcloud.unipush" android:path="/" android:scheme="unipush" />  
</intent-filter>  
</activity>  
<activity  
android:name="io.dcloud.PandoraEntryActivity"  
android:launchMode="singleTask"  
android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard|smallestScreenSize|screenLayout|screenSize|uiMode"  
android:hardwareAccelerated="true"  
android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"  
android:screenOrientation="user"  
android:theme="@style/DCloudTheme"  
android:windowSoftInputMode="adjustResize">  

        <intent-filter>    

            <category    
                android:name="android.intent.category.DEFAULT" />    

            <category    
                android:name="android.intent.category.BROWSABLE" />    

            <action    
                android:name="android.intent.action.VIEW" />    

            <data    
                android:scheme="h56131bcf" />    
        </intent-filter>    
</activity>

预期结果:
AndroidMainfest.xml  

<activity  
android:name="io.dcloud.PandoraEntry"  
android:configChanges="orientation|keyboardHidden|keyboard|navigation"  
android:launchMode="singleTask"  
android:hardwareAccelerated="true"  
android:theme="@style/TranslucentTheme"  
android:screenOrientation="user"  
android:windowSoftInputMode="adjustResize" >  
<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:host="io.dcloud.unipush" android:path="/" android:scheme="unipush" />  
</intent-filter>  
</activity>  
<activity  
android:name="io.dcloud.PandoraEntryActivity"  
android:launchMode="singleTask"  
android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard|smallestScreenSize|screenLayout|screenSize|uiMode"  
android:hardwareAccelerated="true"  
android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"  
android:screenOrientation="user"  
android:theme="@style/DCloudTheme"  
android:windowSoftInputMode="adjustResize">  

        <intent-filter>    

            <category    
                android:name="android.intent.category.DEFAULT" />    

            <category    
                android:name="android.intent.category.BROWSABLE" />    

            <action    
                android:name="android.intent.action.VIEW" />    

            <data    
                android:scheme="h56131bcf" />    
        </intent-filter>    
</activity>

实际结果:
AndroidMainfest.xml  

<activity  
android:name="io.dcloud.PandoraEntry"  
android:configChanges="orientation|keyboardHidden|keyboard|navigation"  
android:launchMode="singleTask"  
android:hardwareAccelerated="true"  
android:theme="@style/TranslucentTheme"  
android:screenOrientation="user"  
android:windowSoftInputMode="adjustResize" >  
<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:host="io.dcloud.unipush" android:path="/" android:scheme="unipush" />  
</intent-filter>  
</activity>  
<activity  
android:name="io.dcloud.PandoraEntryActivity"  
android:launchMode="singleTask"  
android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard|smallestScreenSize|screenLayout|screenSize|uiMode"  
android:hardwareAccelerated="true"  
android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"  
android:screenOrientation="user"  
android:theme="@style/DCloudTheme"  
android:windowSoftInputMode="adjustResize">  

        <intent-filter>    

            <category    
                android:name="android.intent.category.DEFAULT" />    

            <category    
                android:name="android.intent.category.BROWSABLE" />    

            <action    
                android:name="android.intent.action.VIEW" />    

            <data    
                android:scheme="h56131bcf" />    
        </intent-filter>    
</activity>

bug描述:

intent详细参数:intent://io.dcloud.unipush/?#Intent;scheme=unipush;launchFlags=0x4000000;package=com.copm.universal.owner;component=com.copm.universal.owner/io.dcloud.PandoraEntry;S.gttask=;S.UP-OL-SU=true;S.title=%E8%AE%A2%E5%8D%95%E9%80%9A%E7%9F%A5;S.content=%E6%9D%8E%E5%84%BF%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%8B%E5%8D%95%E6%88%90%E5%8A%9F%E4%BA%86;S.payload=test;end

AndroidMainfest.xml  

<activity  
android:name="io.dcloud.PandoraEntry"  
android:configChanges="orientation|keyboardHidden|keyboard|navigation"  
android:launchMode="singleTask"  
android:hardwareAccelerated="true"  
android:theme="@style/TranslucentTheme"  
android:screenOrientation="user"  
android:windowSoftInputMode="adjustResize" >  
<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:host="io.dcloud.unipush" android:path="/" android:scheme="unipush" />  
</intent-filter>  
</activity>  
<activity  
android:name="io.dcloud.PandoraEntryActivity"  
android:launchMode="singleTask"  
android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard|smallestScreenSize|screenLayout|screenSize|uiMode"  
android:hardwareAccelerated="true"  
android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"  
android:screenOrientation="user"  
android:theme="@style/DCloudTheme"  
android:windowSoftInputMode="adjustResize">  

        <intent-filter>    

            <category    
                android:name="android.intent.category.DEFAULT" />    

            <category    
                android:name="android.intent.category.BROWSABLE" />    

            <action    
                android:name="android.intent.action.VIEW" />    

            <data    
                android:scheme="h56131bcf" />    
        </intent-filter>    
</activity>
2024-05-16 11:32 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com (作者)

有没有大佬帮忙处理下这个问题,帮忙看看,已经好多个月了。

要回复问题请先登录注册