Closed laurenyew-nytimes closed 2 years ago
Might be duplicate of #137 and fixed by #136.
I can confirm that you cannot set targetSdkVersion 31 in apps that depend on TrueTime because the build process fails.
However, you can redeclare the receiver in your app main manifest file, and Android Studio manifest merger will ignore the library declaration:
<!-- Start the Service if applicable on boot -->
<receiver android:name="com.instacart.library.truetime.BootCompletedBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
This is not optimal and you need to remember to remove this once the library is fixed, but it works.
I am checking now more carefully this, and it seems like it needs a lot more work is needed to make it compatible... I'm getting PendingIntent mutability exceptions everywhere, and this seems to be at fault:
https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability
So, when this will be ready for android 12?
@otorresd This library seems unmaintained, you're better off downloading the source and fixing it by yourself like I did. It is very simple and contains only a few classes.
I didn't need the boot broadcast receiver so I just removed all of it, problem solved. Otherwise just check my previous comments.
You might just as well create a maintained FOSS fork (assuming that this repo's license permits it). Note that there are many forks of this repo (likely mostly PRs), maybe there is already a maintained one? Note that there also are other issues/PRs about this in this repo: https://github.com/instacart/truetime-android/issues/139#issuecomment-882458402.
Ok, thanks
Duplicated by https://github.com/instacart/truetime-android/pull/136
Feel free to reopen if not the case.
Hi, I'm trying to upgrade my project to Android 12 and I use the truetime-android library. When my project uses this dependency, it is failing due to a ManifestMerger issue b/c truetime doesn't have android:exported="false" in it's activity's intent filter in AndroidManifest.xml. Can you please fix this and put out a new release so I can use the library with Android 12 (https://developer.android.com/about/versions/12/behavior-changes-12#exported)? Thanks!