- Install the latest version of the Android SDK. Make sure the following
packages are present in the Android SDK:
- Android SDK Build-tools 25.0.2
- Android SDK Platform 24
- Latest Android Support Repository
Copyright templates for JetBrains & Android Studio.
https://medium.com/@shan1024/managing-copyright-notices-in-intellij-idea-a3f0456267ba
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.reflect.* | |
| object Reflect { | |
| private val cache = mutableMapOf<String, AccessibleObject>() | |
| /** | |
| * Get a method from a class | |
| * | |
| * @param obj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "pid":1629121, | |
| "fn":"Jaylen", | |
| "ln":"Adams", | |
| "conf":"East", | |
| "ta":"ATL", | |
| "tn":"Atlanta Hawks", | |
| "num":"10", | |
| "pos":"G", |
fun Resources.getValue(id: Int, resolveRefs: Boolean = true) = TypedValue().also {
try {
(if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Resources::class.java.getDeclaredField("mResourcesImpl").apply {
isAccessible = true
}.get(this)
} else this)?.run obj@{
this::class.java.getDeclaredMethod("getValue",
Int::class.java, TypedValue::class.java, Boolean::class.java).apply {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2013 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| package="com.jaredrummler.usagestatsperm"> | |
| <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" | |
| tools:ignore="ProtectedPermissions"/> | |
| <application | |
| android:allowBackup="true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.annotation.SuppressLint | |
| import android.content.Context | |
| import android.content.SharedPreferences | |
| import android.preference.PreferenceManager | |
| class Prefs( | |
| private val preferences: SharedPreferences, | |
| private val encryptor: StringEncryptor? = null, | |
| private val obfuscator: Obfuscator? = null | |
| ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <manifest package="com.jaredrummler.android.common" | |
| xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <application> | |
| <provider | |
| android:name="com.jaredrummler.android.files.FileProvider" | |
| android:authorities="${applicationId}.fileprovider" | |
| android:exported="false" | |
| android:grantUriPermissions="true"> | |
| <meta-data |
