-
Notifications
You must be signed in to change notification settings - Fork 72
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
openScale cordova plugin #119
base: master
Are you sure you want to change the base?
Conversation
…Android content provider
Thanks, this sounds very good. I'll check out the code soon and get back to you. |
Wow @oliexdev ! You did an amazing job! Thank you so much! |
I'm getting this in the console when I launch the app. I don't think the request for permission or the import/export of data should be part of the app initialization. I think this would be better in the settings menu. |
can you give more information? Did you use the latest openScale dev version? How do you launch the waistline app? In the browser? On a smartphone or on a emulator? |
I'm testing in Firefox. I haven't tried it on my phone yet, I don't use OpenScale so don't know anything about how it works. |
Well, it is an Android plugin so it doesn't work if you run it with your Firefox. Please run it on your Android smartphone and use the latest openScale development version and openScale should be really self explained, it is not rocket science ;) |
Well I do all my dev work in the browser so I'll see if can disable it when using that platform. I'll also want to make sure it's disabled by default on Android for users (like me) who don't use OpenScale or maybe there is a way to detect if OpenScale is installed and automatically activate the plugin. Anyway I'll give it a go on my phone and report back. |
I've installed the latest dev version of OpenScale and enabled 3rd party access, I also added some data to OpenScale. I then ran Waistline. I wasn't prompted to provide any permissions for OpenScale (maybe it only works with fresh installs of Waistline?) I've pasted the logcat output below.
|
I don't know, normally you don't need a fresh waistline installation on every start. With |
Did you change your default homepage? Maybe that's affecting it |
no I run waistline on the smartphone with the command |
I just ran Waistline using your command and unfortunately I'm experiencing the same issue. I noticed this in the console which I think is a little different to last time
|
hmmm.... but it looks like the permission request was started with: Do you test it on a real smartphone not in an emulator? You can also manual enable the permission in Android under |
Yes I test on my Xiaomi Mi4i running LineageOS. I'll try manually enabling and report back |
That permission isn't showing up for me in the settings |
I don't know LineageOS but it looks like you have an old smartphone with an old Android version. |
Lineage used to be called Cyanogen. The version I use is Android 7.1.2. I think we could do with some more people to test this on different devices and see what's happening. |
Then I don't know why you don't get the permission request!? |
Indeed it's very strange |
Hey @oliexdev @davidhealey! Thanks for your work! I'm open to test it. I'm using openScale for a while and just discovered waistline. I installed the dev version of openScale. How do I build waistline? |
Hi, There are some build instructions here - #90 |
I created an openScale cordova plugin to exchange the weights and calories data between waistline and openScale, see issue #71.
Note: Currently, it works only with the latest openScale development version, which you can find here. Then you have to enable the 3rd party access in openScale (under Settings->General).
On the waistline startup the user is asked to grant permission to read/write from/to openScale data.
If the user granted the permission then the calories from waistline with their corresponded timestamp is exported to openScale and all weights from openScale with their corresponded timestamps are imported to waistline.
Note: Currently, it is not really written to the waistline database (only printed out on the console; since you know your code better, I will let it by you how you handle the incoming data)
also in openScale the data is not really written to the openScale database (I need to add another field for calories first).Edit: implemented it with commit oliexdev/openScale@ed60b24Some things we may have to discuss:
app.js
to another file/function, which I'm gonna to leave it to you.So some things still have to be done but let me hear what do your think?
Note: If you change something in the Android plugin you have to remove and add the plugin again to the project otherwise the plugin isn't compiled. You can do it with the following command:
cordova plugin rm openscale && cordova plugin add android_plugins/openscale/ && cordova run android