Registering permissions
Since the app is dealing with network connections, we need to add the following INTERNET permission to AndroidManifest.xml
:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
After adding the preceding permission to the AndroidManifest.xml
file, the code should look like this:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.androidpentesting.smartspy" > <uses-permission android:name="android.permission.INTERNET"></uses-permission> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN...