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" ...

Get Penetration Testing: A Survival Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.