meypod / al-azan

Privacy focused ad-free open-source muslim Adhan (islamic prayer times) and qibla app
https://meypod.github.io/al-azan/
GNU Affero General Public License v3.0
183 stars 26 forks source link

azan is not playing in android build #25

Closed UmerHayyat54 closed 1 year ago

meypod commented 1 year ago

Can you provide more info ?

meypod commented 1 year ago

Please try latest version if possible: https://github.com/meypod/al-azan/releases/download/v1.10.0-rc.29/al-azan--release-1.10.0-rc.29--universal-38000-signed.apk

UmerHayyat54 commented 1 year ago

okay lets me check APK also

UmerHayyat54 commented 1 year ago

yes it working Thanks bro

meypod commented 1 year ago

I'm glad it's working

UmerHayyat54 commented 1 year ago

Hi, @meypod I hope you are well. I am facing an issue to run your project on ios. please can you guide me or if you can provide ios IPA it will be good for me Thanks

meypod commented 1 year ago

Hi I'm sorry, I know this is a react native app, but currently app is not made to work on ios Maybe in future when I have access to apple products I'll work on it, but for now it's not going to happen

UmerHayyat54 commented 1 year ago

@meypod okay thanks

UmerHayyat54 commented 1 year ago

@meypod Hi, I hope you are well. do you try to implement it on ios? Thanks

meypod commented 1 year ago

Hi @umerhayat54 I am sorry but I do not have apple products, so I can't really work on it

UmerHayyat54 commented 1 year ago

Hi @umerhayat54 I am sorry but I do not have apple products, so I can't really work on it

Thanks For your reply. it's okay. can you share if you have to do what will you need to change in it?

meypod commented 1 year ago

tl;dr; there's a lot of work

There's a lot of things that needs testing, but in general these are the things I can remember at the moment that certainly need work:

  1. the most important feature, which is relied on, is the alarm manager of android in notifee library. have to check how it works on iOS, because in android I'm using it to launch the dismiss adhan page.
  2. then it's media player. for good reasons that I don't remember exactly now (probably the fine control over mid-call behavior and other stuff), I decided to write the media player using android's native media player. for iOS either it has to be done manually like the android part or it has to be swapped out with a cross platform solution.
  3. both native widget and notification widget rely on android's native xml layouts. so they probably need to be created from scratch for iOS as well
  4. qibla compass module and it's magnetic pole adjustment needs to be redone in iOS
  5. after everything is done, should hide the android specific settings (like common problems page) from user
UmerHayyat54 commented 1 year ago

tl;dr; there's a lot of work

There's a lot of things that needs testing, but in general these are the things I can remember at the moment that certainly need work:

  1. the most important feature, which is relied on, is the alarm manager of android in notifee library. have to check how it works on iOS, because in android I'm using it to launch the dismiss adhan page.
  2. then it's media player. for good reasons that I don't remember exactly now (probably the fine control over mid-call behavior and other stuff), I decided to write the media player using android's native media player. for iOS either it has to be done manually like the android part or it has to be swapped out with a cross platform solution.
  3. both native widget and notification widget rely on android's native xml layouts. so they probably need to be created from scratch for iOS as well
  4. qibla compass module and it's magnetic pole adjustment needs to be redone in iOS
  5. after everything is done, should hide the android specific settings (like common problems page) from user

Thank for sharing.

UmerHayyat54 commented 1 year ago

@meypod can you please tell how you handle Azan notifications when the app is in a kill state? Thanks

meypod commented 1 year ago

@umerhayat54 as far as I understand, you can't do anything if app is killed (all scheduled alarms are wiped, etc) however if the app is swiped away (not killed explicitly), you have to look at what https://github.com/invertase/notifee/ does, because that's what I use for scheduling and handling notifications

in the second case (if the app is not killed explicitly and is sitting in the background), if that's what you are asking for, since I have already look at the notifee's code, what it does is it keeps and reuses application context everywhere in the code

like when trying to run a headless task from a broadcast, it reuses the broadcast context for running the task this prevents some common issues and restrictions that are set on background processes :)

I hope this helps

UmerHayyat54 commented 1 year ago

@umerhayat54 as far as I understand, you can't do anything if app is killed (all scheduled alarms are wiped, etc) however if the app is swiped away (not killed explicitly), you have to look at what https://github.com/invertase/notifee/ does, because that's what I use for scheduling and handling notifications

in the second case (if the app is not killed explicitly and is sitting in the background), if that's what you are asking for, since I have already look at the notifee's code, what it does is it keeps and reuses application context everywhere in the code

like when trying to run a headless task from a broadcast, it reuses the broadcast context for running the task this prevents some common issues and restrictions that are set on background processes :)

I hope this helps

yes it is helpful for me Thanks let's me see it