我正在尝试向我的清单添加一些意图过滤器,以便使用QR码访问应用程序。
我读过我们必须添加:
<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="myApp"/>
</intent-filter>
但是当我添加它时,我在Adobe Flash中遇到错误(当我点击发布设置时)。
你能告诉我,我是否把它放在了错误的地方吗?
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<!--
Usage:
To localize the description, use the following format for the description element.
<description>
<text xml:lang="en">English App description goes here</text>
<text xml:lang="fr">French App description goes here</text>
<text xml:lang="ja">Japanese App description goes here</text>
</description>
To localize the name, use the following format for the name element.
<name>
<text xml:lang="en">English App name goes here</text>
<text xml:lang="fr">French App name goes here</text>
<text xml:lang="ja">Japanese App name goes here</text>
</name>
-->
<application xmlns="http://ns.adobe.com/air/application/14.0">
<id>Aquarium</id>
<versionNumber>1.0.0</versionNumber>
<versionLabel/>
<filename>aquarium</filename>
<description/>
<name>aquarium</name>
<copyright/>
<initialWindow>
<content>aquarium.swf</content>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<fullScreen>false</fullScreen>
<aspectRatio>landscape</aspectRatio>
<renderMode>cpu</renderMode>
<autoOrients>false</autoOrients></initialWindow>
<icon>
<image36x36>36.png</image36x36>
<image48x48>48.png</image48x48>
<image72x72>72.png</image72x72>
<image96x96>96.png</image96x96>
</icon>
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="my.app" android:scheme="http"></data>
</intent-filter>
</activity>
<customUpdateUI>false</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<android>
<manifestAdditions><![CDATA[<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
</manifest>]]></manifestAdditions>
</android>
<supportedLanguages>fr</supportedLanguages>
</application>
答案 0 :(得分:0)
你可以在这里看到
Android, How to read QR code in my application?
这里有litle教程:
http://ribinsandroidhelper.blogspot.in/2013/03/qr-code-reading-on-your-application.html
请点击ctrl + shift + f来整理你的清单; - )