-
• #2
Thanks - actually yes, that looks like a really good idea - and it'd avoid this mess of having to have things like
launch
andlaunchb2
apps.Anyone else have any thoughts? My inclination is to try and get this in as soon as possible, and then to merge welcome/launch back together before all the bangle 2s get shipped out.
-
• #3
Just added - check out the
launch
app (will push in a few minutes) -
• #4
Good idea, but to be clear this is about the app loader view from the user perspective. It still allows for seperate versions of the code in the src/app directory.
Creating a single App that supports all Bangle Js devices ideally means a single source file. That means..
- conditional code based on hw version
- using the layout manager
- using tricks like
g.setFont('Vector', g.getWidth()/8)
- conditional code based on hw version
-
• #5
Yes - by far the best way is to have one app that works on both devices.
It's just very occasionally (eg welcome/launcher) the code is just so different it doesn't make sense to have it in the same file
I've been working on a launcher, and like everyone else, have been creating two separate apps because of the form factor differences (screen/buttons) between Bangle.js 1 and 2. I think that we need a way to make it easier to create single apps that support both models. Obviously, sometimes this is as simple as some if statements checking the hardware version. But when that isn't the case, there has to be a better way to do this where we can create a single app but it will install/run different code depending on the model it is used on instead of maintaining two copies of the same app for that reason.
Below is my recommendation on how we could do this. In an attempt to future proof this, I have included a hypothetical Bangle.js 3 which would have a similar form factor to the real Bangle.js 2 and therefore would be able to use the same code for both models. Under Storage, I added the same supports list to the files used to install that app.
The default value for supports is implicitly all models. This is what you would use for setting, icon, and boot files when it would be the same for all 3 models. When you explicitly list the model(s) in supports, it is only written to Storage on install for that model(s). This would allow for more code reuse and reduce app storage use on the watch.
In the hypothetical launch app below, only one launch.app.js file is written to a BANGLEJS or BANGLEJS2/BANGLEJS3. In the hypothetical welcome app below, only one welcome.app.js file and welcome.boot.js file is written to a BANGLEJS, BANGLEJS2, or BANGLEJS3.
Example of my proposed apps.json format for supporting this recommendation.
I hope that I did a good job of explaining this and that others think that this would be a useful improvement. Please let me know if you have any questions or suggestions.