Pages

Thursday, June 2, 2011

Allows Android applications to open network sockets: "android.permission.INTERNET"

If your Android application need to access Internet, you have to grand permission to open network sockets.

Add the code <uses-permission android:name="android.permission.INTERNET" /> in AndroidManifest.xml,

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.exercise.AndroidTwitterClient"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".AndroidTwitterClient"
                  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>
    <uses-sdk android:minSdkVersion="3" />
    <uses-permission android:name="android.permission.INTERNET" />
</manifest> 

No comments:

Post a Comment

Popular Posts