BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Ability to move app definition into source control and back out


#1

I like to have my sketches in source control. That is fine for all our code, but the app definition is not bidirectional.

We can fetch a text representation of an app via the HTTP Get project API and we can toss that into source control, but the utility of that is limited since we cannot roll back to an earlier state and import it back into the app to get back to where we were previously. We would have to read the json and manually change the widgets.

What I suggest is two things, one an enhancement to the Get Project and the other, a way to submit a project.

  1. The enhancement, in the same way that we can have the authorization token emailed to use from the app properties screen, it would be nice to have an option to email us the json file of the project.
  2. The more important step is being able to to bring such a json project file into the app builder.

This could be via an import gesture in the app, or perhaps by an HTTP PUT. I think having a local import in the app would make issues of adjusting energy easier to handle. Downside of a local import is that file handling of mobile devices is rather cumbersome, but doable.

If the project file could be submitted via HTTP, I think it would be best if there was a Blynk URL we could visit, paste in the project json and click a button to have that definition become the new app definition. We would have to authenticate and the auth token would need to match.
Existing and new energy use of the app could be compared and any net increase compared against our balance before it could succeed.


#2

I haven’t really done much with the QR codes for projects, but doesn’t the QR code give you the app definition?
The API gives you the QR code, so can’t that be used to store the current app in source control and then the app allows it to be restored by scanning the saved code?

Pete.


#3

yes, QR codes do encapsulate the whole app, but they are binary objects and don’t lend themselves to to source control well. Yes, one could fetch the QR code and check it in with the json in order to track what changed and the ability to revert to the version. Note however, that the auth token is not encapsulated in the QR code so when one reverts, by scanning the old QR code you get a new app, with its own new auth token…