Comments (22)
No of course it's not by design ^^, it's a bug, probably duplicate with #42.
from rxpermissions.
@jaydeep17 Sounds interesting. Could you please provide more detailed steps which you can reproduce it with? (Does not happen for me when using both request()
and ensure()
).
from rxpermissions.
Deployed a new version 0.7.0 that should fix that. Please check.
from rxpermissions.
I tried the new version, but it's still the same, it doesn't show up the second time
from rxpermissions.
Can you post more code ? I need to understand where and when the library is invoked.
from rxpermissions.
Here's a very simplified form of the calls to RxPermissions I have
RxPermissions.getInstance(this)
.request(Manifest.permission.ACCESS_FINE_LOCATION)
.flatMap(granted -> RxPermissions.getInstance(this)
.request(Manifest.permission.ACCESS_FINE_LOCATION))
.subscribe(...);
I don't have it exactly the same way as shown here, the second call to request
is deep down in a sub function.
from rxpermissions.
Why do you need a second call for the same permission ?
from rxpermissions.
We have this utility class called RxGoogleMaps that carries out specific operations on Google Maps and every method inside that class that requires location permission asks for the permission before carrying out the operation. For example, showMyLocationButton()
, moveToLastKnownLocation()
, etc.
Unfortunately, once the permission is asked, then 2 levels deep we have a .flatMap()
, that calls another of these RxGoogleMaps method, and thus permission is requested again.
from rxpermissions.
I think you should request the permission only one time.
from rxpermissions.
True that's a problem on my side, but don't you think RxPermissions should work, even if I request it twice.
from rxpermissions.
Yes but it may be not possible since RxPermission had to deal first with configuration changes.
from rxpermissions.
I have the same the question for that. If I want to deny this permission again. How can I get to change this permission?
from rxpermissions.
If I want to deny this permission again
Its up to the user to grant or deny, you have no control on that.
from rxpermissions.
I mean that when I request the permission again. If the user have granted the permission. the dialog(Permission) is not appear .How can I get the dialog appear again?
(English is not very well,please excuse me)
from rxpermissions.
If the user have granted the permission. the dialog(Permission) is not appear .How can I get the dialog appear again?
After the user have granted the permission, the only way for user to revoke permission is via App Settings. Otherwise dialog won't appear again.
from rxpermissions.
Yea, I actually think this is by design. After the dialog has appeared once, if the user granted or denied the permission, the permission, in theory should not appear again.
Edit:
I take that back. Unless they check never ask again, it should keep asking if they ever access whatever needs the permissions again.
from rxpermissions.
Just to know if there is a way to trigger the dialog ot show again.
from rxpermissions.
Yes, you can clear your data and that should allow you to receive the dialog again.
from rxpermissions.
Any chance for that to be done programmatically? So that i cant ask
permission till that gets granted?
Il 09 set 2016 6:35 PM, "Ngoc Buu Tran" [email protected] ha
scritto:
Yes, you can clear your data and that should allow you to receive the
dialog again.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#44 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMPS4DLhlYJ5li7VfLa9ekCPuSs4xBRks5qoYregaJpZM4H7EEm
.
from rxpermissions.
Any update on this issue, I have the same issue here. Firstly, I request CAMERA permission (Manifest.permission.CAMERA
). If a user grants the permissionI then request WRITE_EXTERNAL_STORAGE permission (Manifest.permission.WRITE_EXTERNAL_STORAGE
). Depending on User grant/decline WRITE_EXTERNAL_STORAGE permission the captured Image will be located at ExternalStorageDirectory/ExternalFilesDir but the request for WRITE_EXTERNAL_STORAGE
never get callback (onNext, onError, onComplete
)
from rxpermissions.
@toidv
can you post some code?
from rxpermissions.
This is demonstration code @tarasantoshchuk
Firstly, request camera permission
private void requestCameraPermission() {
mSubscription = rxPermissions.request(Manifest.permission.CAMERA)
.subscribe(new Subscriber<Boolean>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
e.printStackTrace();
}
@Override
public void onNext(Boolean aBoolean) {
if (aBoolean) {
requestWriteExternalStoragePermission(MEDIA_TYPE_IMAGE.getMediaType());
} else {
InploiUtils.showSnackbar(view, R.string.permissions_not_granted);
}
}
});
}
Then request write external storage permission
private void requestWriteExternalStoragePermission(final String mediaTpe) {
if(mSubscription != null) {
mSubscription.unsubscribe();
}
mSubscription = rxPermissions.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe(new Subscriber<Boolean>() {
@Override
public void onCompleted() {
Timber.e("onCompleted");
}
@Override
public void onError(Throwable e) {
Timber.e("onCompleted");
e.printStackTrace();
}
@Override
public void onNext(Boolean aBoolean) {
if (!aBoolean) {
showSnackbarWarning(aBoolean, mediaTpe);
} else {
showMediaType(aBoolean, mediaTpe);
}
}
});
}
from rxpermissions.
Related Issues (20)
- How does it work with Android 11? HOT 1
- bug: request permission twice, in one subscribe receive callback twice
- 点击dialog外侧,dialog也会取消,且shouldShowRequestPermissionRationale=flase HOT 3
- Migrate to Maven Central
- Typo is Readme File HOT 3
- Bug:Can not perform this action after onSaveInstanceState
- Gradle import failed HOT 8
- Need to Migrate JCenter to mavenCentral HOT 5
- Cannot access class 'io.reactivex.rxjava3.core.Observable'. Check your module classpath for missing or conflicting dependencies HOT 2
- Bug: requestEach callback do not contain each permission result HOT 3
- Memory Leak
- FragmentTransition Bug
- Crash with new navigation library HOT 3
- Removing Jetifier
- android 11 中 获取应用列表时一个神奇现象
- Bug can not import packagename library HOT 2
- compileSdk 33,pixel 手机android 13,请求权限失败 HOT 7
- 没有subscribe方法 HOT 1
- There is no method
- 楼主是不是不维护了啊,Android13更新,授权相关的要适配了 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxpermissions.