qw123wh / Aospdeskclock

Fork of aosp deskclock: alarm,clock, timer,stopwatch
Apache License 2.0
50 stars 9 forks source link

Publish on F-Droid #1

Closed qw123wh closed 3 years ago

qw123wh commented 3 years ago

@IzzySoft or whoever is capable of it, can you help me to publish this app on F-droid?

IzzySoft commented 3 years ago

Gladly. But first we'd need some more details here:

Once those details are available, your app can get listed quickly here – and from that I could help you establishing Fastlane structures for your listing at F-Droid.

qw123wh commented 3 years ago

I've added the Apache-2.0 license. I've added screenshots. The features are the same as the aosp clock. I only added power off alarm,extra feature, to make the alarm work with the phone off (it only works on devices with snapdragon processor and at the moment it works 100% in aosp custom roms,on miui it doesn't work, but it could work on oxygen os, asus rom ... you have to test it) Is there still something missing?

IzzySoft commented 3 years ago

I've added the Apache-2.0 license.
I've added screenshots.

Thanks! Added it to my repo. Should show up at the URL indicated above in about 5h from now (with the next regular sync).

The features are the same as the aosp clock.

For those not aware (the average user probably doesn't even know what AOSP stands for), maybe a short summary? Let me see if I get that right:

Deskclock is a fork of the AOSP clock, so it offers all its functions:

  • alarms
  • stop-watch
  • count-down "timer" (aka "tea timer")

additionally, it adds "power-off alarm function" (alarm will ring with phone off, Snapdragon phones only, tested on LineageOS).

Would that fit? Thanks to your screenshots, details are shown visually. So if you agree, I'd change the description to above quote. And then prepare a PR bringing you the Fastlane structure needed for F-Droid.

qw123wh commented 3 years ago

Thanks so much. I agree with you, you choose the best description, you are more experienced than me. As for the PR who has to do it? Me or you? Be patient I am a beginner.

IzzySoft commented 3 years ago

There you go! Just check if it suits you, then merge. You can always adjust/update when needed once it's merged. Let me know when I shall trigger the listing with F-Droid.org; in about 1.5h your listing with my repo gets active so you can have a first look already.

IzzySoft commented 3 years ago

Thanks for merging! It's live now in my repo. Looks ready for F-Droid.org if you want to proceed.

qw123wh commented 3 years ago

Ok we can proceed, but I don't know what to do at this point 😂😂😂.Tell me what to do.

IzzySoft commented 3 years ago

We'd need a new tag (which then includes the Fastlane structures). Then I could open a merge request with F-Droid to bring your app in there.

qw123wh commented 3 years ago

Yes please, i am not capable. At best, I just know how to accept pull requests. For me you can also publish it on F-Droid in your name, or that name of another person. I am only interested in making it known because today this is the best complete (clock,timer,alarm,stopwatch) open source clock app, without ads and without internet permissions or other weird stuff. Otherwise, if I have to do it by force I will please explain to me step by step how to do it.

IzzySoft commented 3 years ago

You already created a tag and release yesterday, before Fastlane was added. Just repeat those steps – after increasing versionCode in your build.gradle and adjusting the versionName, e.g.

        versionCode 2
        versionName "1.0.1"

(I chose 1.0.1 as there were only minor changes, mostly to documentation – of course you can also use "1.1" if you prefer). After that, create a tag like before, having its name match versionName as it did last time. Then let me know it's ready, and I'll pick up from there.

qw123wh commented 3 years ago

Here we go, update released with two extra features

IzzySoft commented 3 years ago

So here we go now – let's see what the scanners say, and whether F-Droid can build it (which I expect it can). Until it's ready there (which will take a couple of days), your update should show up in my repo with the next sync tomorrow.

OK, so it passed the automated tests already. But before we can continue there, we'll need some explanation for the permissions:

android.permission.DISABLE_KEYGUARD
android.permission.READ_PHONE_STATE
android.permission.VIBRATE
android.permission.RECEIVE_BOOT_COMPLETED
android.permission.USE_FULL_SCREEN_INTENT
android.permission.READ_EXTERNAL_STORAGE
android.permission.WAKE_LOCK
android.permission.WRITE_SETTINGS
android.permission.FOREGROUND_SERVICE
org.codeaurora.permission.POWER_OFF_ALARM

I understand the last one; VIBRATE and RECEIVE_BOOT_COMPLETED are probably clear as well (register new alarms at boot?). USE_FULL_SCREEN_INTENT is probably for when an alarm fires (to give the user a chance to snooze/stop the alarm). I wonder you don't need SET_ALARM – but the remaining questions are entirely unclear. Especially, what do you need READ_PHONE_STATE for? What are you reading from external storage? Why do you want to disable the screen lock? I have a vague guess for the latter and WAKE_LOCK + FOREGROUND_SERVICE, but would prefer hearing from you first :wink:

qw123wh commented 3 years ago

I removed the following permissions: android.permission.READ_PHONE_STATE android.permission.USE_FULL_SCREEN_INTENT (As i read about os commit lineage, this permission is needed for api 29 onwards. I removed it to me it works fine even without it, but if in the future there will be some problem I will be forced to put this authorization back android.permission.READ_EXTERNAL_STORAGE android.permission.WRITE_SETTINGS android.permission.FOREGROUND_SERVICE.

The following permissions remain: android.permission.VIBRATE (it is used to enable vibration when the alarm sounds).

android.permission.WAKE_LOCK and android.permission.DISABLE_KEYGUARD (they have to do with the alarm notification; practically without these 2 permissions when the screen is locked the alarm does not sound and the app crashes).

org.codeaurora.permission.POWER_OFF_ALARM (it is used to make the alarm sound when the phone is off. On lineage it works well, on miui not so much the phone turns on again but the alarm does not ring. On Oppo it works well, you should test it on other phones like Oneplus, Asus ...)

android.permission.RECEIVE_BOOT_COMPLETED (without this permission the alarm does not sound. However, even if a way was found to eliminate this permission and make the alarm work well, it would damage Power off alarm, because practically the phone would turn on again when turned off, but the alarm would not sound (practically what is currently happening on MIUI)

However, we remind you that this is a system app present on Android stock aosp. (Maybe that's why there was some weird permission like android.permission.READ_PHONE_STATE, and maybe that's why the other permissions are needed otherwise everything crashes). Fortunately this "fork" / "porting". The additional functions such as the shutdown alarm and the flip and snake action are however taken by Custom Rom as a Lineage OS

qw123wh commented 3 years ago

I hope I explained myself. However, for the other authorizations you have to ask Google 😂😂. It is google that created this app, then he modified it and created google clock. However I released the new version without unnecessary permissions.

IzzySoft commented 3 years ago

Thanks a lot! What's needed can of course stay – as I already wrote, e.g. USE_FULL_SCREEN_INTENT might be needed (as you confirmed). IIRC, Android 10 or 11 made that mandatory if you want to launch a foreground activity from an app running in background. As long as things are useful/needed, they should just be explained transparently. So this one maybe should be added back. Same might be true for FOREGROUND_SERVICE, I don't know. Just if it's needed, make sure to explain it either directly with the app description – or with the README here at Github.

If you want to put it with the app's description, a short variant could be appending the following to full_description.txt (starting with an empty line to separate it from the currently last paragraph):

<b>Permissions used:</b>

* <code>VIBRATE</code>: enable vibration when the alarm sounds
* <code>WAKE_LOCK</code>, <code>DISABLE_KEYGUARD</code>: alarm notification when the screen is turned off
* <code>POWER_OFF_ALARM</code>: make the alarm sound when the phone is off (supported devices only)
* <code>RECEIVE_BOOT_COMPLETED</code>: register alarms on device start
* <code>USE_FULL_SCREEN_INTENT</code>: needed with Android 10+ to show the alarm screen when an alarm fires

A more detailed description can be found <a href='https://github.com/qw123wh/Aospdeskclock/blob/master/README.md'>in the repository's README</a>.

Feel free to adjust. The last line of course only fits if you put the "long variant" into the README, else just leave it out. Same for USE_FULL_SCREEN_INTENT should you not want to add it back.

Please let me know if you want to add that for the currently last version (and re-create the tag accordingly). I'll pick up once you've let me know :wink:

qw123wh commented 3 years ago

I have updated the description, or re-added USE_FULL_SCREEN_INTENT. I also created a new tag. Tell me if it's okay now

IzzySoft commented 3 years ago

Thanks! I've just updated the YAML file and pushed it to the MR, let's wait for the pipelines and I'll finalize the review. As you included the link for "a more detailed description", you should also place it there (maybe at the end of the README, after the screenshots). No need to re-tag for that, as the link goes to HEAD anyway.

IzzySoft commented 3 years ago

Yeah, all tests passed! \o/ May I recommend giving the app a more distinct name, though? Took me two looks to tap the right icon, as its "parent" was available on-device as well :laughing:

The MR is currently in rebase, and should be merged automatically once rebasing succeeded. Thus my part is done here, see How long does it take for my app to show up on website and client? Once it shows up, and after a week's overlap, I'll remove your app from my repo again to avoid confusion with "double listings".

Thanks for reaching out to us, for contributing to F-Droid, and addressing the issues that promptly! Should you need help again, just call :smiley:

qw123wh commented 3 years ago

Thank you very much, your help was essential. I would like to ask you one last thing, after the app is available on fdroid, as far as updates are concerned, do I have to do something different? Or does it automatically synchronize with the releases I leave on github?

IzzySoft commented 3 years ago

As long as you stick to the current tag naming pattern, and remember to always increase versionCode, new releases should be picked up automatically. It will just take a little for them to show up at F-Droid then: same build cycle, signing etc. as described with above link.

qw123wh commented 3 years ago

Perfect thank you very much

qw123wh commented 3 years ago

The app was loaded successfully on F-Droid, thanks again for your help. I added the F-Droid button to download the app. I close the issue