[Right! I've fixed this myself, solution at the bottom - but I'm
posting anyway in case anyone else is struggling with the same
thing...]
OK, I admit I'm new to Android, and could be making silly mistakes.

I'm trying to do a simple XML remote procedure call using the
org.xmlrpc.android library. When I tried this first I did not have
android.permission.INTERNET set, but I now do; my manifest is now:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="uk.co.cygnets.ov.android"
      android:versionCode="1"
      android:versionName="1.0.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name" android:permission="android.permission.INTERNET">
        <activity android:name=".OVAndroid"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

However, when in the emulator I open Settings -> Applications ->
Manage Applications -> OV Android (my application), the panel
'Permissions' still says 'No permissions required'. I'm guessing that
the emulator is holding onto stale data, but I'm not certain why. I
have deleted my application from the emulator, and reinstalled it,
several times.

"android.permission.INTERNET" is not present in the auto-generated
file 'R.java'; I don't know whether it should be. I've deleted this
and regenerated it several times, too.

OK, nw the fix

>From my reading of the documentation here:
http://code.google.com/android/devel/bblocks-manifest.html I guessed
that I needed a 'uses-permissions' element so I experimentally tried

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="uk.co.cygnets.ov.android"
      android:versionCode="1"
      android:versionName="1.0.0">
    <uses-permission android:name="android.permission.INTERNET"/>
    <application android:icon="@drawable/icon" android:label="@string/
app_name" android:permission="android.permission.INTERNET"
android:enabled="true" android:debuggable="true">
        <activity android:name=".OVAndroid"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

This works! Whether I also need the 'android:permission' attribute on
the application tag I don't know, but it doesn't seem to do any harm.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to