-
Notifications
You must be signed in to change notification settings - Fork 41
Add support for binary and hex files #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for binary and hex files #4
Conversation
I will have a look and do some tests in the next period. Thank you for contributing |
@@ -38,7 +38,13 @@ public void startDFU(String address, String name, String filePath, Promise promi | |||
starter.setDeviceName(name); | |||
} | |||
starter.setUnsafeExperimentalButtonlessServiceInSecureDfuEnabled(true); | |||
starter.setZip(filePath); | |||
|
|||
if (filePath.endsWith(".bin") || filePath.endsWith(".hex")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On iOS the extension check is case insensitive, but on Android it isn't. Wouldn't it be better to check against the filePath's toLowerCase()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
I've added your repo's branch as npm dependency, however on my Android 12 device it was crashing with your branch. I'm assuming because you don't have the Android 12 updates from this PR. |
Thanks for the feedback. Will look into the above next week. |
In some cases it is more convinient to use a binary or hex file directly instead of using a zip file. We can check the extention and do the appropriate action.
065f6eb
to
30f1b4e
Compare
Rebased to remotes HEAD. |
Moved your implementation on this MR #6 |
In some cases it is more convinient to use a binary or hex file directly instead of using a zip file.
We can check the extention and do the appropriate action.