SufficientlySecure / birthday-calendar

Display all contact birthdays automatically in your standard Android calendar.
https://www.schuermann.eu/android/
GNU General Public License v3.0
95 stars 28 forks source link

Cannot create account on Android 7 #96

Open Schroedingers-Cat opened 7 years ago

Schroedingers-Cat commented 7 years ago

Since I updated to Android 7 (Linage OS), Birthhday Adapter doesn't sync anymore. I cannot add an account from the app, the calendar vor system settings -> accounts. No error message, it just doesn't happen.

dschuermann commented 7 years ago

If you open BA, can you enable it from there?

Schroedingers-Cat commented 7 years ago

Yes, I can open BA and and swipe the slider "Calendar" to activate it. However, after some seconds, the slider is back disabled.

dschuermann commented 7 years ago

did you give BA all the required permissions? Android settings -> Apps -> Birthday Cal -> Permissions

Schroedingers-Cat commented 7 years ago

Yes, both sliders are enabled.

Schroedingers-Cat commented 7 years ago

Is there anything else I can provide?

ghost commented 7 years ago

Same Problem here under Lineage OS 14.1 (Android 7.1.1).

sciamano commented 7 years ago

I also see this problems under Lineage OS 14: can't create account, no sync. If I open BA, I can "enable" it, press "sync now", close -> the birthdays appear in calendar. Open BA again, and it show it is deactivated! And some time later the birthdays disappear from calendar as well :(

Any way to debug it?

guest4711 commented 5 years ago

Same problem on Pie...

abirke commented 5 years ago

I am experiencing the same on Android 7.1.2, LineageOS 14.1 (API 25) with the following log

2019-04-11 21:54:50.218 12144-12144/org.birthdayadapter.free D/Birthday Calendar: Adding account...
2019-04-11 21:54:50.262 12144-12144/org.birthdayadapter.free D/AndroidRuntime: Shutting down VM
2019-04-11 21:54:50.267 12144-12144/org.birthdayadapter.free E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.birthdayadapter.free, PID: 12144
    java.lang.SecurityException: uid 10142 cannot explicitly add accounts of type: org.birthdayadapter.account
        at android.os.Parcel.readException(Parcel.java:1692)
        at android.os.Parcel.readException(Parcel.java:1645)
        at android.accounts.IAccountManager$Stub$Proxy.addAccountExplicitly(IAccountManager.java:1058)
        at android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:757)
        at org.birthdayadapter.util.AccountHelper.addAccountAndSync(AccountHelper.java:68)
        at org.birthdayadapter.ui.BasePreferenceFragment.addAccountAndSync(BasePreferenceFragment.java:145)
        at org.birthdayadapter.ui.BasePreferenceFragment.access$000(BasePreferenceFragment.java:47)
        at org.birthdayadapter.ui.BasePreferenceFragment$1.onPreferenceChange(BasePreferenceFragment.java:84)
        at android.support.v7.preference.Preference.callChangeListener(Preference.java:914)
        at android.support.v7.preference.TwoStatePreference.onClick(TwoStatePreference.java:66)
        at android.support.v7.preference.Preference.performClick(Preference.java:976)
        at android.support.v7.preference.Preference.performClick(Preference.java:961)
        at android.support.v7.preference.SwitchPreferenceCompat.performClick(SwitchPreferenceCompat.java:207)
        at android.support.v7.preference.Preference$1.onClick(Preference.java:148)
        at android.view.View.performClick(View.java:5637)
        at android.view.View$PerformClick.run(View.java:22433)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6186)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

PR #108 fixes the issue for me. Can anyone confirm?