Comments (16)
Fixed in v4.0.1
implementation 'com.github.BirjuVachhani:locus-android:4.0.1'
from locus-android.
Sorry for not being able to test it, will update to the new version tomorrow, thanks for your effort!
from locus-android.
+1
Same issue here
from locus-android.
This should fix it. Try this and let me know if it works fine. I'll release it.
implementation 'com.github.BirjuVachhani:locus-android:master-SNAPSHOT'
from locus-android.
@larsmathuseck @Zee-BA Can you please confirm?
from locus-android.
Thanks for the fast reply.
I have trouble building from the master snapshot
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.github.BirjuVachhani:locus-android:master-SNAPSHOT.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/BirjuVachhani/locus-android/master-SNAPSHOT/maven-metadata.xml
- https://dl.google.com/dl/android/maven2/com/github/BirjuVachhani/locus-android/master-SNAPSHOT/locus-android-master-SNAPSHOT.pom
- https://repo.maven.apache.org/maven2/com/github/BirjuVachhani/locus-android/master-SNAPSHOT/maven-metadata.xml
- https://repo.maven.apache.org/maven2/com/github/BirjuVachhani/locus-android/master-SNAPSHOT/locus-android-master-SNAPSHOT.pom
- https://jitpack.io/com/github/BirjuVachhani/locus-android/master-SNAPSHOT/maven-metadata.xml
- https://jitpack.io/com/github/BirjuVachhani/locus-android/master-SNAPSHOT/locus-android-master-d9f8b59f14-1.pom
Required by:
project :app
https://jitpack.io/com/github/BirjuVachhani/locus-android/master-SNAPSHOT/locus-android-master-d9f8b59f14-1.pom
gives Not found
. Any idea what's wrong here?
from locus-android.
Could it be that the snapshot build failed for some reason?? Let me check.
from locus-android.
Found it. Its Java version issue. The project uses JAVA 1.8 but Gradle requires Java 11. I'll fix this.
from locus-android.
when the library gets updated for this issue.
from locus-android.
+1
😢
Your library is awesome thoug
from locus-android.
I am having hard time fixing Jitpack with Java 11. I'll try to release a version this weekend. Thank you for bearing this with me...
from locus-android.
Meanwhile can anyone try to run the sample project and see if the flags issue is gone or not? It is working for me so just wanted to confirm before releasing.
from locus-android.
I just checked the demo-app. It still crashes for me on my Pixel 4 with Android 12.
Caused by: java.lang.IllegalArgumentException: com.birjuvachhani.locationextensionsample: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
at com.birjuvachhani.locus.LocationBroadcastReceiver$Companion.getPendingIntent(LocationBroadcastReceiver.kt:46)
I think the code should be
val flags =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
else PendingIntent.FLAG_UPDATE_CURRENT
instead of
val flags =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
PendingIntent.FLAG_UPDATE_CURRENT and PendingIntent.FLAG_MUTABLE
else PendingIntent.FLAG_UPDATE_CURRENT
( or instead of and).
Also, are you sure the Intent must be mutable?
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
from locus-android.
@larsmathuseck Thanks for the super informative response. I am not 100% sure about mutability flag as this library was developed a long time ago. I'll do some research to remove it if possible.
For now, I have made suggested changes and have tested on Android 12 emulator (which I couldn't before). It is not crashing for me. Let me know if this works for you. I have pushed the fix to master.
from locus-android.
Thanks for the fast fix.
The latest version seems to work on my device.
from locus-android.
That's great. Now I need to fix Jitpack.
from locus-android.
Related Issues (20)
- How to resolve this HOT 9
- Android Api 30 get current location HOT 1
- Github Action not working with Locus HOT 1
- Failed to resolve dependency HOT 2
- Handle Error itself
- Looking for Maintainers HOT 3
- Crashes when tries to go for location settings HOT 6
- Not Working in android 6
- Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent HOT 1
- Support Huawei HMS Location Kit HOT 11
- Update Documentation for LocationRequest Configuration (Release v4.1.1)
- Request enable location crash HOT 2
- Cannot get latest location from fun getCurrentLocation(context: Context,onResult: (LocusResult) -> Unit)
- Getting Location without GMS and HMS.
- Location SingleUpdate sometimes not accurate
- huawei support causes crash when calling "stopLocationUpdates" HOT 3
- No resource found - Theme.AppCompat.Light.DarkActionBar HOT 2
- Custom dialog designs. HOT 2
- Support for Coarse/Approximate Location Only HOT 2
- Error Locus.configure Request HOT 1
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 locus-android.