Skip to content

Instantly share code, notes, and snippets.

View crysxd's full-sized avatar

Christian Würthner crysxd

View GitHub Profile
@crysxd
crysxd / ExampleActivity.java
Last active February 8, 2019 13:13
Requesting Android M 6.0 permission with couple of lines
...
public class ExampleActivity extends AppCompatActivity {
public void onClick(View v) {
// This example shows how to request CALL_PHONE and READ_CALENDAR and do some stuff with the permissions
// The user will only be prompted for the permissions he not yet has granted
new PermissionRequestManager()