问题描述
我的客户正在将Zebra TC51设备与RhoMobile一起使用。他想从Android 7.1升级到Android 8.1。使用最新的救生员更新进行升级后,我们的RhoMobile应用程序将不再能够使用扫描仪。它根本没有反应。该实现使用的是Barcode Javascript API,它在TC51 Android 7.1上以及在具有最新Lifeguard的带有Android 8.1的新TC52设备上也可以正常运行。仅升级的TC51设备存在该问题。
无论如何,我在使用datawedge作为条形码提供程序的任何TCx设备和Cordova容器方面都取得了巨大的成功。我也尝试将其与RhoMobile一起使用。
这是我的AndroidManifest.erb代码
...
<receiver android:name='com.rho.intent.IntentReceiver'>
<intent-filter>
<action android:name='<%= @appPackageName %>.ACTION'/>
<action android:name='com.symbol.datawedge.api.RESULT_ACTION'/>
<action android:name='com.symbol.button.L1'/>
<action android:name='com.symbol.button.R1'/>
<action android:name='com.symbol.button.L2'/>
<action android:name='com.symbol.button.R2'/>
<category android:name='android.intent.category.DEFAULT'/>
</intent-filter>
</receiver>
</application>
...
我的代码如下
try {
Rho.Intent.startListening((data) => {
alert(JSON.stringify(data));
});
const intentParams = {
action: "com.symbol.datawedge.api.ACTION",intentType: Rho.Intent.broADCAST,data: {
"SEND_RESULT": "false","com.symbol.datawedge.api.GET_VERSION_INFO": ""
}
};
Rho.Intent.send(intentParams);
} catch (e) {
alert(e);
}
当我运行代码并监视logcat
时,就可以看到意图已收到并发送了答案
09-24 10:10:02.863 1732 1732 D com.symbol.datawedge.api.m:
onReceive(..):com.symbol.datawedge.ScanningService@4191885,Intent {
act=com.symbol.datawedge.api.ACTION flg=0x10 (has extras) }
09-24 10:10:02.877 1413 1477 E ActivityManager: Sending non-protected broadcast
com.symbol.datawedge.api.RESULT_ACTION from system 1732:com.symbol.datawedge/u0a10 pkg
com.symbol.datawedge
,但是我的应用程序从未收到它。有任何提示/想法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)