zidoro / pomatez

Stay Focused. Take a Break.
https://zidoro.github.io/pomatez/
MIT License
3.94k stars 163 forks source link

Mobile Version (Android & iOS) #310

Open sekwah41 opened 1 year ago

sekwah41 commented 1 year ago

I originally was considering making a react native versions and will still consider re-making the UI from scratch using react native to have a web version for the desktop and native version on android and ios but will likely to keep some of the animations and reduce the amount of work needed use Ionic. Tauri is also working on a mobile version which we will likely migrate to once that is supported but not knowing how far that is off I will make a decision to either try to help their efforts or make an ionic version for now.

I personally will buy a license to publish on the store as a free app, though the same license should also allow us to sign the mac version which should remove the main issue of #266 and #200 which you need to go into the settings to bypass. Though unless we also put it on the mac store it will still notify that it is being downloaded from the web at least.

Tasks:

I will also need to add branch protections and other things to ensure that none of the contributors accidentally allow someone to run an action which can pull the build secrets that we publish with.

I will also check that we dont have any possible risks with the snap secrets that @roldanjr has set up.

sekwah41 commented 1 year ago

I will need to review what iOS and android policies are on user tracking just to make 100% sure we don't cause problems. I'm certain we can still have it but it's just to be sure any relevant permissions menus pop up though I believe that's usually only relating to marketing tracking

sekwah41 commented 1 year ago

I will focus on an android version first as it is easier to develop that first on linux.

If I end up doing enough dev or its a pain to set my mac as a remote builder I may take a look into getting a mac mini or something to basically run as a small dev server.

Though for now if the old MacBook I have doesn't support the latest xcode I should be able to force it to the latest.

sekwah41 commented 1 year ago

Will need to explore how making extras such as native modules is for Tauri https://tauri.app/blog/2022/12/09/tauri-mobile-alpha/ and see if this is worth looking into over Ionic.

sekwah41 commented 1 year ago

https://tauri.app/blog/2022/12/09/tauri-mobile-alpha/

roldanjr commented 1 year ago

https://tauri.app/blog/2022/12/09/tauri-mobile-alpha/

This is awesome 💯

Proxycon commented 1 year ago

A mobile version would be much appreciated! Please consider also distributing through f-droid.

sekwah41 commented 1 year ago

@Proxycon i forgot about that. Luckily I have android devices around so should be able to test that. When I get some more time ill experiment :D

sekwah41 commented 1 year ago

Once https://github.com/zidoro/pomatez/issues/282 is merged or in a usable state, I will take a look into this as https://github.com/tauri-apps/tauri-mobile is now more usable. And due to the way it looks at a glance, it seems we can create native parts using the rust as the core logic/communicator with the UI.

However, if we wanted to interact with the components more, I believe we would need to store more in some sort of backend storage rather than the browser store. But that's a hurdle to get to at a later date.

sekwah41 commented 10 months ago

Give the way Tauri seems to handle mobile it seems it would be quite nice to get a base app out then start exploring features such as widgets and the iPhone dynamic island.

Though I plan to make a Tauri version focused on windows and Mac at least then upgrade/update.

While Tauri can work on Linux it doesn't have a native browser vs bundling one. Also most of the issues I've seen have been on this version so it has less benefits vs electron.

sekwah41 commented 10 months ago

I've made some great progress on the Tauri version, once that is finished I will start to toy with a mobile version testing on Android primarily as I only have an old MacBook for building to my iPhone.

So, to get the main app working, I will be testing on Android.

rileyhawk1417 commented 10 months ago

Any way to get our hands on the android build?

sekwah41 commented 10 months ago

@rileyhawk1417 there is not currently any progress on an android or ios build atm, I've almost finished the tauri v2 version for desktop though a lot of the same code should work fine for mobile.

What I can do is release some super super early versions for android to download here once I've finished the desktop version and before I've started making many UI changes for mobile specifically.

Though that will mean that a lot of desktop features e.g. shortcuts will show on mobile or settings that will do nothing e.g. minimise to system tray.

Ill post some more info here once I've sorted the desktop version and started toying with the mobile versions, android will be the main focus to get that working first with the base app.

rileyhawk1417 commented 10 months ago

@sekwah41 well am alright getting my hands dirty with the code. Was just curious on how its going to run on mobile. Will just wait till that code is shared, hopefully I can play around with it :)

sekwah41 commented 10 months ago

Yep ill give you a ping :) Planning to use Tauri v2 to run it on mobile! :D

rileyhawk1417 commented 10 months ago

Well i did try setting up the project for pomatez but got a yarn error, about it failing to resolve one of the packages. Anywhere where i can some docs to set it up?

sekwah41 commented 9 months ago

Well i did try setting up the project for pomatez but got a yarn error, about it failing to resolve one of the packages. Anywhere where i can some docs to set it up?

What is the yarn error you got?

sekwah41 commented 9 months ago

A mobile version would be much appreciated! Please consider also distributing through f-droid.

Added to the list, I've seen it but never used f-droid.

sekwah41 commented 9 months ago

I think once we have versions working, we will want to look into implementing some of the other issues first e.g. #166 should be modified to be something more unique. I will also look to making the apps available through the beta testing channels or to specific users so that we can make it available without fully publishing.

Though I have other priorities, I will work on this every now and then ^.^

sekwah41 commented 9 months ago

The plan is to make it roughly work but try to make it modular so we can split it out and clean it up as the project continues.

sekwah41 commented 9 months ago

image

first preview of it working on Android with no frontend changes

image

One issue is whenever a command is called it causes problems.

Tbh one thing that may need to do is a timer function which is native to rust so it can run in the background for more advanced features. Though one way to make that work would be to re-sync it when the UI re-opens so the electron version also works.

sekwah41 commented 9 months ago

App Apk.zip Here is the app apk though as I said this is only with the base functionality. No modifications to the UI yet.

I just tried to install it on my phone but it says it cant for some reason.

rileyhawk1417 commented 9 months ago

🤔 well wouldn't it be easier to have a launcher of sorts. That way it can launch the relevant script for either mobile or desktop?

sekwah41 commented 9 months ago

https://f-droid.org/en/docs/Building_Applications/ Will take a look to publish for fdroid once more progress is done.

sekwah41 commented 9 months ago

🤔 well wouldn't it be easier to have a launcher of sorts. That way it can launch the relevant script for either mobile or desktop?

what do you mean? almost everything is managed via the package.json using commands to launch it.

Yarn/npm is usually quite consistent on how its used though having some quick setup/pre-requisite scripts may be handy to help quick setup.

Though ill look for some alternatives for more uniform help with setting up e.g. a scripts folder wish bash scripts.

Im currently modifying the tauri version to wrap the app and using the #[cfg(desktop)] flag to say what should compile for common and desktop.

sekwah41 commented 9 months ago

Btw if anyone has discord you can add me as sekwah or join my discord https://discord.gg/fAJ3xJg

It may be easier to discuss things a bit faster or send files.

However I will be keeping an eye on this issue to discuss things here and posting updates for everyone to see.

rileyhawk1417 commented 9 months ago

Will send in a friend request and also join the discord server. Come to think of it does Pomatez have a discord server?

sekwah41 commented 9 months ago

I literally messaged @roldanjr earlier saying I was thinking of making one.

rileyhawk1417 commented 9 months ago

Well even if its not discord but as long as its a place for people to communicate. For me its a mess trying to get through GitHub's notifications 😅

sekwah41 commented 9 months ago

If anyone else is interested in joining in the conversation I will be trying to discuss info over here https://discord.gg/ZqPqN3hwcB (ive made a discord for pomadez though need to sort it out)

dubisdev commented 9 months ago

What is the yarn error you got?

Hi all! I'm interested on the android version :)

FYI I think the error is related to the .nvmrc config. It is configured to use Node 16 and the @tauri-apps/api package needs node 18:

image

Maybe the .nvmrc should be updated?

I forced my pc to use 18 and now it performs a fresh install without problems.

I'll continue testing to see how I can help :)

sekwah41 commented 9 months ago

Yep you are right. I don't personally use the rc file 😂

sekwah41 commented 9 months ago

Also we've only just started exploring an android version as i just got the desktop Tauri one out.

dubisdev commented 9 months ago

Great! I would like to help. I have some experience with tauri apps (not with the mobile part btw).

sekwah41 commented 9 months ago

This is going to be incredibly fiddly especially if we are supporting the electron version at the same time especially if we want the app to properly close when its minimised as well as run in the background on ios

Shahin-rmz commented 8 months ago

Also we've only just started exploring an android version as i just got the desktop Tauri one out.

Hi, new interested user here. would love to know about the status of mobile version, and if we need a selfhost a server to sync mobile with Desktop! Thanks

sekwah41 commented 8 months ago

Currently nothing in the works for syncing, I've been busy recoding one of my other projects and almost have it finished before returning to this hence the progress has stopped for a few weeks.

Gotta fix something with mac signing and the current setup a bit but will post more when I start again.

Currently, there are no plans for the sync server though it would be good to take a look at it even if it was just syncing to things like Google Drive or other cloud providers like how obsidian can do.

The main challenge will be re-doing the timing logic. I mean switching it to remember the start and end so exiting and re-opening will not be that hard but either we need a live activity or some consistent timed notifications across Android and IOS.

It may turn out to be easy though it's my first time writing mobile apps with background processes, especially across multiple platforms, I've done some mobile apps using Cordova before though we decided to give Tauri a try for the 1 size-fits-all approach (not saying its a bad choice though its deffo newer+less other apps to go off).

Another thing I want to do is take a look at what the best way of doing this might be with designing mobile-first and re-writing what I need to as we go so that we are not just duck-taping extra features on sloppily.

Btw are you using Android or iOS?

Shahin-rmz commented 8 months ago

@sekwah41 first of all, thanks for the prompt answer. There are many users who benefits from your piece of code and want to increase their productivity.

though it would be good to take a look at it even if it was just syncing to things like Google Drive or other cloud providers like how obsidian can do.

It is absolutely very good idea, with the solutions like CalDAV sync the logs of pomatez with other clients, so we can follow our productive routines.

Another thing I want to do is take a look at what the best way of doing this might be with designing mobile-first and re-writing what I need to as we go so that we are not just duck-taping extra features on sloppily.

As a hobby programmer I can just agree with you. Or maybe just a light client that sends api to the server and get response after 25 min?

Btw are you using Android or iOS?

I am Android user, and for the record, Linux user and try to degoogle my life, so sync my data with Nextcloud and try to use my rooted android phone.

sekwah41 commented 8 months ago

I am Android user, and for the record, Linux user and try to degoogle my life, so sync my data with Nextcloud and try to use my rooted android phone.

Can 100% respect the trying to de-google everything :) I use a mix tbh, only reason I switched off Linux as my daily driver was because games (there were a few that proton just didn't fully work with) as well as to have a mix to test software on, so I've got all the different devices lying around ^.^ Also a firm believer of not being tied to one ecosystem (id show the sheer variety of devices I have scattered around the room but its a mess xD)

sekwah41 commented 2 months ago

Need to recode the background logic and how the timer works for this to work.

sekwah41 commented 2 months ago

Also should alter the alert sounds and such before making it mobile.

sekwah41 commented 2 months ago

Been busy with other projects. Will post info when I have more to show. Though not actively developing this atm.