【发布时间】:2017-01-11 04:53:55
【问题描述】:
我们有 Android 原生多标签条码应用程序,其中包含用于蓝牙设备输入条码的条码字段。当这个手机吃午饭时,它首先有一个弹出窗口让用户选择标签。问题是每次蓝牙设备与手机连接或断开连接时,应用程序总是会通过此弹出窗口重新启动。当蓝牙设备连接或断开时,我们如何停止手机重新启动?
我正在附加 AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mentor.med.mobile"
android:versionCode="1"
android:versionName="1.0.1" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:allowBackup="true"
android:icon="@drawable/med"
android:label="@string/app_name"
android:screenOrientation="sensorPortrait"
android:theme="@style/AppTheme" >
<activity
android:name="com.pdx.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustPan"
android:launchMode="singleTop"
android:label="@string/app_name" >
<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="pdx.com" android:path="/view" />
</intent-filter>
</activity>
<activity
android:name="com.google.zxing.client.android.CaptureActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
【问题讨论】:
-
请发布您的清单。
-
嗨,你解决了上面的问题吗,其实我也面临同样的问题