Closed tzachi-dar closed 8 years ago
Compiling this on my system does not include the wear-release. It isn't even created.
On my system, ./wear/build/outputs/apk/wear-release-unsigned.apk was created. Are you looking for another thing?
actually, this is an old file, looking at it more deeply.
It has to be signed... I think I can find a fix by propagating the configuration in the dependency to the wear app.
I believe that signing, can also be done later by the following steps:
follow: http://developer.android.com/tools/publishing/app-signing.html
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore /usr/local/google/home/tzachi/Downloads/signed_apk_keystore_copy.jks ./app/build/outputs/apk/app-xDrip-release-unsigned.apk xDrip
jarsigner -verify -verbose -certs ./app/build/outputs/apk/app-xDrip-release-unsigned.apk
/usr/local/google/home/tzachi/AndroidSDK/android-sdk-linux/build-tools/22.0.1/zipalign -v 4 ./app/build/outputs/apk/app-xDrip-release-unsigned.apk ./app/build/outputs/apk/app-xDrip-release.apk
Or is it another type of signing?
Well, if you sign the wear-app later, you have to repack the app-release to include the wear.apk and resign it again. This is a lot of work. Better to find a solution where it is done automatically.
But to sign it in the process, I have to do something like: signingConfigs { release { storeFile file("myreleasekey.keystore") storePassword "password" keyAlias "MyReleaseKey" keyPassword "password" } }
and than I have to expose the passwords. But is this what you mean?
No, it should be a simple rewrite of the dependency including passing of the configuration parameter. I will update the build.gradle in a few minutes.
I will have to de-capitalize the names of the flavours for that to work.
OK, thanks.
https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/pull/294 This should do it.
OK, thanks.
When compiled as "xDripViewer", the settings section "Data Sync" (where you usually upload things) is empty but the section is still there.
It would be great if this could also be automatically renamed to "XDripViewer settings": https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/blob/xDripViewer8/wear/src/main/res/xml/preferences.xml#L4
At the moment exports form xDrip and xDrip-Viewer go to the same directory and maybe even overwrite themselves (in case of settings-export). In would be nice if you could conditionally change this string (https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/blob/xDripViewer8/app/src/main/java/com/eveningoutpost/dexdrip/utils/FileUtils.java#L17) to "./xdripviewer".
The Android-Wear integration now works perfectly fine with the NS account you provided. Even when the hundreds of values come in after initialization: The arrow dances a bit and the "minutes ago" count down - but everything runs smoothly on the watch :+1:
Also when having installed both xDripViewer and xDrip on the same phone, you can simply toggle the watchfaces from xDrip to xDripViewer and back.
In the next couple of days I hope I can test this with data produced from the medtronic uploader thanks to @MosiGithub.
I'll try to fix the points that you have raised, most of them should not be that complicated.
As for testing with the medtronic uploader, I'm not that optemisitc. The current code is looking at fields that are only uploaded when xDrip is at xDripviewer upload mode. Will they have such fields?
Thanks Tzachi
Well, at least it should not crash (as people may have disabled xDripViewer upload mode)... so I can test that.
By the way: I've been running xDrip (flavour) compiled from this PR and it works as it is supposed to. No noticable difference to xDrip prior to that :+1: :)
Sure, you can test that there are no crashes. I guess that next steps are indeed to test it with other uploaders. I would start with the "classic nightscout uploader" first.
As for settings. The file name for the viewer will be: com.eveningoutpost.dexdrip.viewer_preferences.xml
So, should I change the directory, or is changing the filename alone enough?
It should be a different directory. Databas export would still look the same - and then possibly be imported to the wrong programme. Changing the directory makes xdrip or xdripviewer search in just their directory for imports.
ok, I'll fix that with a different directory.
Committed a fix for different file name and directory for xDrip and xDripViewer. Also changed settings on the watch.
as for the "Data Sync" not appearing in the xDripViewer. I can obviously remove it, but this will have a price in code. This will need a lot more if statements. So I thought that I'll change that on the viewer to be something like "No data sync" or maybe change that to "".
Thoughts?
If it is so much easier take "". I'd say. This will give us a double delimiter and doesn't look bad either.
OK, fixed the datasync issue.
Added support for xDripViewer even when xDrip itself is not in xDripViewer mode.
If anyone has more comments please let me know.
Closing this branch since it was merged in xDripViewer 8.
This is the xDripViewer rebased on the current master.
It also changes the labels for the watch.