NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.41k stars 1.15k forks source link

How to track/monitor more than one persons with one one smartphone (xDrip+ app)? #267

Closed bordeb closed 3 years ago

bordeb commented 6 years ago

Is there any good way to achieve that I can follow more than one (2) persons (two dexcom G4) with one phone? For example - one xDrip Parakeet (person1) and one xDrip Bluetooth (or other xDrip Parakeet) for person2. Is there a way to install multiple instances of the app, each following one person, or some other way? The goal is to be able to wear only one smartphone while monitoring two persons (one is the owner of the phone (for example T1D parent) while the other is remote (for example T1D child)? I can not figure it out how to achieve this.

tzachi-dar commented 6 years ago

One phone can run two instances of xDrip. One can be a normal xDrip installation using BT. The second one can read data from another xDrip (that is be an xDrip follower) or read data from a parakeet. In order to install the second application you need to make a small change when building xDrip. I can do that for you but in that case, you will not be able to build and install xDrip yourself anymore.

So, do you want me to build it for you, or do you build your own version?

bordeb commented 6 years ago

OMG how cooperative and helpful community here! @tzachi-dar thak you very much! I would like to try myself because I don't want to bother more than necessary. Also life long learning is a beautiful thing. I did not completely understand your sentence that if you build it I will not be able to build and install xDrip myself. Could you please provide some more info? Did you mean on updating, or maybe...? Can you also point me in some direction where to start reading in order to try to build this myself? Thank you once again!!

jamorham commented 6 years ago

I can start providing variant builds again but previously they have only been used for testing.

bordeb commented 6 years ago

Thanks for joining in this discussion @jamorham . I am getting pure experts support here! tnx :-) Is it maybe insecure in some way (unreliable) to use "unofficial" builds compiled in order to be able to have multiple instances of the same app? Is it good, feasible and safe solution or the person tracked with unofficial build is in some unfavorable position? Am I aiming something too much, should I maybe give up on that idea? Hopefully not!

doc77 commented 6 years ago

There are several apps on Google Play that allow you to create an app copy to run multiple accounts of the same app. Just search "parallel space" or "app clone" and you'll find them. Perhaps one of them will work for you.

bordeb commented 6 years ago

Tnx man ! Yes, I already googled similar and found several apps, but I wanted to ask here because altruism driven gurus always know better than google etc..., and I also thought that it is better to rely on open source directly (even if it is customized) than some closed code apps etc... This is of great importance and very ensitive issue to all of us here :-) , so I prefered to ask community experts first. @tzachi-dar and @jamorham provided excellent suggestions and great help, so I will stick to that!

tzachi-dar commented 6 years ago

I think that creating an official variant can be a good idea. (at least for the stable versions).

bordeb - you can see example branches that run as variants, for example: on the branch tzachi-readnfc there a commit called "Updated version of running as variant 1." with sha-1 56acf8b61a3d638983d52567ea182cade4132ccd

bordeb commented 6 years ago

I think that creating an official variant can be a good idea. (at least for the stable versions).

That would be great idea, if it is not a big hassle for developers! That would be very beneficial for lots of us users that do not posses such extremely high level of IT expertise and knowhow as main developers have - the app is so overwhelming and usefull. Also it would be great because it would be much safer for non-experts. xDrip app is so powerful and useful app that it will be great to have additional version if one needs more than 1 instance of the app!! To argument this, just a small anecdote: yesterday my wife and I just discussed how excited and happy we are in a last couple of months when we implemented xDrip app, Nightscout, Parakeet, python RPi receiver - it is the same level of joy (and improvements) as it was a year ago when we first started to use dexcom... TNX to all.

bordeb commented 6 years ago

tzachi-dar qute: ...In order to install the second application you need to make a small change when building xDrip. I can do that for you but in that case, you will not be able to build and install xDrip yourself anymore...

@tzachi-dar would you be so kind and provide some more info insight about that. I would really like to understand the connection/limitations of building and installing xDrip myself if someone else (like you in the example) does it for me at first. It is very interesting for me so I would like to learn what you were thinking saying this. Maybe it would be also interesting for others. TNX in advance!

tzachi-dar commented 6 years ago

So, the main issue is that after one builds an android application it is being signed by a key. Usually, this key is created by android studio and should be kept secret. One who does not have the original key will not be able to build and install the exact same application.

That said, you can always export the data from xDrip, uninstall it, and then install the one that you have built yourself.

bordeb commented 6 years ago

Dear @tzachi-dar thank You very much on your kind explanation and your time spent here to help! Now I understand more thoroughly after reading your post. @jamorham said that he will build the official "variant" version so I will joyfully wait for it (keeping my finger crossed :-) ) and than install this variant app so I can be assured that my variant app is built by an pro expert and not me. I think that this is going to be a great thing and tzachi-dars suggestion that official variant build can be focused just to stable versions is very good in respect to utilization of developers time. In the meantime while joyfully waiting for official variant build I will try to train myself and practice using Android Studio...

bordeb commented 6 years ago

Hi! Just wanted to ask some additional questions raised in my head anticipating real life situations while happily waiting for official variant build:

Thank you!

jamorham commented 6 years ago

@bordeb You can download nightly variants here: https://drive.google.com/open?id=0B6mvYVNVC-fOWkxnVF80dlFabjQ please let me know if that works ok for you. I would suggest getting the most recent variant nightly. (View as list -> sort by last modified)

bordeb commented 6 years ago

@jamorham thank you very much! You are so kind and helpful! It is great! Can you please explain me a little bit what is the "variant number" , I mean xDrip-plus-variant4... vs. ...variant3... ? I will test it on spear phones and report here.

bordeb commented 6 years ago

Hello! Just want to give some feedback. I am using the variant builds now for almost a month. Its big deal, great thing and big THANK YOU again. I started with early build xDrip-plus-variant1-20180122-d8e7097 thinking that it will be stable as for now latest stable regular (non variant) release 20180122-d8e7097 but found the variant release buggy (although regular relase is great). Then I updated to xDrip-plus-variant1-20180315-3f52aa5 and it was great, no problems detected At the moment I have latest available xDrip-plus-variant1-20180330-5b7b3c7 that is also great.

Between, dear @jamorham & @tzachi-dar what would be your suggestions regarding the update approach for variant builds. Now that the variant builds are stable and mature (that is my opinion and experience), in order to be max on the safe side -bug free, in the future should I choose builds that would correspond to the regular stable builds or always choose the latest variant release? TNX in advance for your opinions. Also, maybe it would be great (my apologies if I omitted the info already published somewhere) to put some links/explanation about availability of variant builds, so someone can more easily find this info if needed. For me personally, this is extremely valuable and big big thank you once more! I promise, I will stop now with those "thank you" :-)

bordeb commented 6 years ago

hi dear xdrip team members. I closed this issue yesterday and now still waiting for 20180828-1603270 variant builds for 2 days and I am not sure if this has maybe stooped the production of variant builds so reopening this just in case.Those variants are so valuable especially for us that need more than one installations!

bordeb commented 6 years ago

Hi @jamorham ! Did maybe something go wrong with production of variant builds when I closed this issue couple of days ago? I am warring that I messed up something, as I can not any more see new variant releases in the Google Drive: https://drive.google.com/open?id=0B6mvYVNVC-fOWkxnVF80dlFabjQ Tnx in advance!

Colingroovey commented 5 years ago

Sorry to open up an old thread, but I am in the same position as @Bordeb, in as much as I want to have two instances of xdrip running on 1 phone. 1 for myself reading my own miaomiao locally, and the second version set up as a follower, (which is already set up following my son).

Are these options now available ?

bordeb commented 5 years ago

yes @Colingroovey it works perfect thanks to @jamorham who provides automatic variant builds following above gdrive link: https://drive.google.com/open?id=0B6mvYVNVC-fOWkxnVF80dlFabjQ You just need to install for example standard release for one person then variant1 for another etc...

Colingroovey commented 5 years ago

Fantastic, I eventually worked it out when I read the piece in full. I've got a second version installed, just waiting for the new miaomiao.Many thanksOn 8 Feb 2019 20:12, bordeb notifications@github.com wrote:yes @Colingroovey it works perfect thanks to @jamorham who provides automatic variant builds following above gdrive link: https://drive.google.com/open?id=0B6mvYVNVC-fOWkxnVF80dlFabjQ You just need to install for example standard release for one person then variant1 for another etc...

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

bordeb commented 5 years ago

great! You are very welcome. This xdrip is fabulous piece of software. One note regarding updates: Regular version can be auto updated but variant builds require manual updating after downloading new version from @jamorham 's gdrive

jamorham commented 5 years ago

Pro tip is to change the flair colors on one of the xDrip instances, for example I have my navigation bar bright purple. That way it is much much harder to get mixed up which xDrip you have open. You can find those settings in the xDrip+ Display Settings.

I also have renamed the alarms with the name of the person handled by that xDrip instance so that when I get an alarm I know who it is for.

You also can attach multiple widgets to the home-screen.

Colingroovey commented 5 years ago

Great tips, thank you .On 8 Feb 2019 21:52, JamOrHam notifications@github.com wrote:Pro tip is to change the flair colors on one of the xDrip instances, for example I have my navigation bar bright purple. That way it is much much harder to get mixed up which xDrip you have open. You can find those settings in the xDrip+ Display Settings. I also have renamed the alarms with the name of the person handled by that xDrip instance so that when I get an alarm I know who it is for. You also can attach multiple widgets to the home-screen.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

TecMunky commented 5 years ago

I would like to see the current code for the variants. I can't find it on github. could someone please point me to the repository so I can look at it?

thanks in advance.

tzachi-dar commented 5 years ago

@TecMunky I'm using https://github.com/NightscoutFoundation/xDrip/commit/fdbb30210208a62a6606dc2e9dfaefcdeca62b1b

TecMunky commented 5 years ago

So I made the same changes in that commit to a new branch in my local repository, and got the following error during the build process (this is the same error I got when I tried before):

:app:handleReleaseMicroApk FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:handleReleaseMicroApk'. The main and the micro apps do not have the same package name.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 6s 44 actionable tasks: 15 executed, 29 up-to-date`

tzachi-dar commented 5 years ago

Did you run Gradlew assembledebug from command line?

בתאריך יום ד׳, 20 בפבר׳ 2019, 02:21, מאת TecMunky <notifications@github.com

:

So I made the same changes in that commit to a new branch in my local repository, and got the following error during the build process (this is the same error I got when I tried before):

`:app:handleReleaseMicroApk FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:handleReleaseMicroApk'.

The main and the micro apps do not have the same package name.

-

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 1m 6s 44 actionable tasks: 15 executed, 29 up-to-date`

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NightscoutFoundation/xDrip/issues/267#issuecomment-465366817, or mute the thread https://github.com/notifications/unsubscribe-auth/AHkw5I7eftIWtlM5LTJTCiW0s6ymNk1hks5vPJUEgaJpZM4RcEzU .

TecMunky commented 5 years ago

I ran gradlew assembleRelease.
Actually, I am using linux so my script copies gradlew to gradlew.sh, then gives gradlew.sh execute priviledge, then runs 'gradlew.sh assembleRelease' specifically:

cpulimit -l 10 ./gradlew.sh assembleRelease >${logpath}/assembleRelease-${1}.log 2>&1

I am running it with assembleDebug now - will report results

TecMunky commented 5 years ago

OK - assembleDebug builds successful - what does it do different and how can I build the release version?

Is it because the 'wear' build.gradle does not have a debug option? Yes - I think so.

I am going to try a couple things -- be right back

TecMunky commented 5 years ago

OK -- fixed it ---

in /wear/build.gradle -- two places change "com.eveningoutpost.dexdrip" to variant name Although I don't know why it is in 2 places in the same function. (yes i see the '=')

defaultConfig {

 applicationId "com.eveningoutpost.dexdrip"

minSdkVersion 21 targetSdkVersion 23 versionCode 1 versionName generateVersionName() buildConfigField "int", "buildVersion", generateVersionNumberString() buildConfigField "String", "buildUUID", generateRandomUUID() buildConfigField "long", "buildTimestamp", generateTimestamp() buildConfigField "int", "targetSDK", targetSdkVersion.mApiLevel.toString()

   applicationId = "com.eveningoutpost.dexdrip"

resValue "string", "label_xdrip", "XDrip" resValue "string", "label_xdrip_large", "XDrip(Large)" resValue "string", "label_xdrip_big_chart", "XDrip(BigChart)" resValue "string", "label_xdrip_circle", "XDrip(Circle)" resValue "string", "label_xdrip_activity", "XDrip Prefs." resValue "string", "app_settings", "XDrip Settings" signingConfig signingConfigs.config

}

TecMunky commented 5 years ago

which begs the question - why isn't the name a variable that only has to be changed in ONE PLACE ???

TecMunky commented 5 years ago

Also, maybe I should be building the debug version - will installing the variant release version cause the variant to try to push the wear app to the watch and cause problems???

tzachi-dar commented 5 years ago

I have never tried using the collector as a variant, I believe that this requires much more work, then just xdrip on the phone.

bordeb commented 5 years ago

Also, maybe I should be building the debug version - will installing the variant release version cause the variant to try to push the wear app to the watch and cause problems???

I have official release as well as official variant build on the same phone. No problem. You can choose whatever version (official or variant...) you want to be installed on the watch.

bordeb commented 5 years ago

I have never tried using the collector as a variant, I believe that this requires much more work, then just xdrip on the phone.

I am using jamorhams variant build as collector for Libre+miaomiao (previously G4) and it works great, without any problems.

Navid200 commented 3 years ago

There is a lot of useful info here. Thanks. Can we close the issue though? The info can still be accessed even after it is closed.
I think we should have an issue open if it means some work is required to be done to close it.

Navid200 commented 3 years ago

Closing due to inactivity

Navid200 commented 3 years ago

Please note if the link above, for the variants, doesn't work, there is a new link: https://drive.google.com/drive/folders/0B6mvYVNVC-fOWkxnVF80dlFabjQ?resourcekey=0-ebguuiPuB1wUI9Rp2zjMNg

bordeb commented 3 years ago

I would kindly ask if the variant builds for the latest "stable" version (at the time of this writing it is 20211004-49817a5) could be available in @jamorham shared Gdrive folder or in @Navid200 shared folder, whatever is more convenient! Imo that way the compatibility between devices (follower, master etc...) with same version can be at highest and most stable possible level. Thank you very much in advance!

Navid200 commented 3 years ago

@bordeb I made this request a few days ago.
The response I got was to please use: https://github.com/NightscoutFoundation/xDrip/releases/tag/2021.10.13-variants

bordeb commented 3 years ago

Thank you @Navid200 very very much on your fast kind response! My suggestion was primarily furure oriented as I have noticed that "stable" variants build was not available in previous "stable" release somewhere in the mid/2020 as well as in this latest one from 10/2021. If possible, availability of variant builds of "stable" releases would be very beneficial from my user perspective. Let's leave that for future considerations and tnx once more.

EDIT: Huge 👍 thumbs-up for including Variants build in the releases section!