jamesfalkner / liferay-android-beacons

A Titanium Appcelerator module to interact with iBeacons via the Radius Networks' iBeacon native android library
Other
46 stars 27 forks source link

Move permissions into the timodule.xml #4

Closed stephenfeather closed 9 years ago

stephenfeather commented 9 years ago

These are two fewer lines that the user needs to add to their tiapp.xml

When the appid can be passed through to the generated androidManifest.xml we can move the rest of the edits here as well.

stephenfeather commented 9 years ago

Eventually something like would be nice:

<android xmlns:android="http://schemas.android.com/apk/res/android">
        <tool-api-level>14</tool-api-level>
        <manifest>
          <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="18"/>
          <uses-permission android:name="android.permission.BLUETOOTH"/>
          <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
          <application>
                <service    android:enabled="true"
                            android:exported="true"
                            android:isolatedProcess="false"
                            android:label="iBeacon"
                            android:name="com.radiusnetworks.ibeacon.service.IBeaconService">
                </service>
                <service    android:enabled="true" 
                            android:name="com.radiusnetworks.ibeacon.IBeaconIntentProcessor">
                            <meta-data android:name="background" android:value="true" />
                    <intent-filter 
                        android:priority="1" >
                        <action android:name="<%- appid %>.DID_RANGING"/>
                        <action android:name="<%- appid %>.DID_MONITORING"/>
                    </intent-filter>
                </service>
            </application>
        </manifest>
    </android>