Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A better way to inject javascript code into specific devices.

Hello developers and Fitbit team!

 

I am working in a new sports-app that presents to the user a screen with many layout variations depending on the user selection and current workout conditions.

It is harder and more expensive in terms of memory usage, to describe all scenarios in SVG layouts than to create a javascript function that hides, changes the color and moves the layout elements accordingly.

The problem is that the proper way to accomplish this task would require to inject specific code for each device form factor. The function for Ionic must be different than the function for Versa.

 

At the moment there are only 2 different screen sizes, but that number tends to increase in the future, with new hardware releases. I also want to mention that code differentiation per device is not something that is restricted to layouts. It would be very nice to be able to target other device-specific features like available memory, SDK version, hardware characteristics, etc.

To be able to mix generic code with specific device code in a single project is an essential feature to allow developers to easily maintain and evolve their apps, following the inevitable evolution of the Fitbit hardware and software platform.

Best Answer
1 REPLY 1

Agree with this. For example: it would be nice if the device has build-in GPS or not.

Best Answer
0 Votes