newtronlabs / easypermissions Goto Github PK
View Code? Open in Web Editor NEWRequest permissions from anywhere as long as you have context.
Home Page: http://www.newtronlabs.com/
Request permissions from anywhere as long as you have context.
Home Page: http://www.newtronlabs.com/
Hey guys thanks for the awesome library now i can call permission anywhere but i think the library not support newer version of gradle, because i got an error its said only support gradle 3.5+ at compile time
Redirected here from a SOF QnA
As the topic header states, I want to start user device's GPS without navigating to a new activity. Can I get this done by using EasyPermission
?
The usual way would be to use Google Play Services which we are currently using but we would like to migrate away from Google libraries.
classpath 'com.newtronlabs.android:plugin:2.0.5-alpha' can not be found. The latest I could use was the version 2.0.3
I tried to use EasyPermission in a ContentProvider like this
public class MyContentProvider extends ContentProvider implements IPermissionsListener {
@OverRide
public boolean onCreate() {
EasyPermissions.getInstance().requestPermissions(this, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_BACKGROUND_LOCATION);
}
}
but i didnt get the permissions. I have both permissions in the manifest.
Is EasyPermissions also available in ContentProviders or only in services?
If yes, what have i done wrong?
Using last version provided on you artifactory public repo, it is impossible to build with the new released Android Studio 3.2 which use : 'com.android.tools.build:gradle:3.2.0'
Can you provide a new version of EasyPermissions updated to last android sdk (pointing sdk 28) ?
Thanks
PS: yes I know, new AS version was released only few days ago on stable branch ;)
Issue facing in android api level 33.
error: error reading C:\Users\han.gradle\caches\transforms-1\files-1.1\easypermissions-2.2.2.aar\d736c6feffd6d838aa0a4c1a74676b5b\jars\classes.jar; error in opening zip file
Fail to compile with android studio v3.1.4
Hello,
testing your library in an small sample app, it fails in a java.lang.StackOverflowError using method with specific permissions declared :
EasyPermissions.getInstance().requestPermissions(App.getContext(), permissionListener, PERMISSION);
version 2.2.0 and 2.2.1
error :
java.lang.StackOverflowError: stack size 8MB
at com.newtronlabs.easypermissions.EasyPermissions.requestPermissions(Unknown Source:9)
....
....
at com.newtronlabs.easypermissions.EasyPermissions.requestPermissions(Unknown Source:9)
at com.ondilo.rxandroidbletest.ble.Ble.ensureLocationPermission(Ble.java:158)
at com.ondilo.rxandroidbletest.MainActivity.onCreate(MainActivity.java:45)
By decompiling app and looking at your obfusacted code (yes I must not look at your code, but it's for debug purpose ;) ), it appears that method :
public void requestPermissions(@NonNull Context paramContext, IPermissionsListener paramIPermissionsListener, String... paramVarArgs)
self call recursively instead of calling (obfuscated name)
private void a(Context paramContext, IPermissionsListener paramIPermissionsListener, String... paramVarArgs)
maybe a mistake in obfuscation step or just calling bad method is base code ;)
Cheer
Can you upgrade this to the newest version?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.