Skip to content

Instantly share code, notes, and snippets.

View yerenutku's full-sized avatar

Eren Utku yerenutku

View GitHub Profile
@yerenutku
yerenutku / PermissionsHelper.java
Created December 7, 2016 16:59 — forked from odedhb/PermissionsHelper.java
A simple class for Android Marshmallow. Showing a list of permissions, and allowing the user to change them. This was created to be implemented in http://wheredatapp.com, android's greatest search engine.
package com.nextstagesearch;
import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
<uses-permission android:name="android.permission.READ_SMS" />
<application ...>
...
</application>
</manifest>