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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.