Reputation: 43
I am trying to create an android application that bluetooth connects to a third party device and saves the data collected into a database. The problem I am currently having is adding the uses-permission for broadcasting and reading the data from a package. my code is as follows in android manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.daotec.bgextract">
<uses-permission android:name="com.b3inc.sbir.mdrs.permission.READ_DATA”/>
<uses-permission android:name="com.b3inc.sbir.mdrs.permission.BROADCAST"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
after i placed in the READ DATA permission i got errors all throughout my xml file and the broadcast permission has an error Attribute is missing the Android namespace prefix. When i run the application i am getting error The value of attribute "android:name" associated with an element type "uses-permission" must not contain the '<' character.
Upvotes: 0
Views: 86
Reputation: 419
I think you have copied this line <uses-permission android:name="com.b3inc.sbir.mdrs.permission.READ_DATA”/>
, Try to replace the double quotes "
Upvotes: 1
Reputation: 2161
Hello try out below code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.daotec.bgextract">
<uses-permission android:name="com.b3inc.sbir.mdrs.permission.READ_DATA" />
<uses-permission android:name="com.b3inc.sbir.mdrs.permission.BROADCAST" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Replace below line then your issue solved.
<uses-permission android:name="com.b3inc.sbir.mdrs.permission.READ_DATA" />
Issue is Replace ” with "
Upvotes: 0
Reputation: 16379
After ...permission.READ_DATA
, you have a formatted quote - ”
. Replace it with the appropriate quote - "
.
Upvotes: 0