Skip to content

Open appropriate Dexcom app #20

Closed
Closed

Description

@channemann

Currently, a single tap on the status screen's glucose chart opens the Dexcom G5 app. If the user is instead using a G4, is would to preferable to open the G4 app (Share 2).

Activity

  1. loudnate commented on Jun 6, 2016

    @loudnate
    Collaborator

    Do you know what the URL scheme is to open the G4 app?

    On Jun 6, 2016, at 10:36 AM, Chris Hannemann notifications@github.com wrote:

    Currently, a single tap on the status screen's glucose chart opens the Dexcom G5 app. If the user is instead using a G4, is would to preferable to open the G4 app (Share 2).

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

  2. channemann commented on Jun 6, 2016

    @channemann
    CollaboratorAuthor

    I do not; is this something you can only find by examining the source code,
    or is it publicly exposed?

    On Mon, Jun 6, 2016 at 11:25 AM, Nathan Racklyeft notifications@github.com
    wrote:

    Do you know what the URL scheme is to open the G4 app?

    On Jun 6, 2016, at 10:36 AM, Chris Hannemann notifications@github.com
    wrote:

    Currently, a single tap on the status screen's glucose chart opens the
    Dexcom G5 app. If the user is instead using a G4, is would to preferable to
    open the G4 app (Share 2).

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

    —
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub
    #20 (comment), or mute
    the thread
    https://github.com/notifications/unsubscribe/AFI0iDqkzh7u-PWrEmci5TuOKSqJ39Dnks5qJGYJgaJpZM4IvImH
    .

    Chris Hannemann
    chris.hannemann@gmail.com

  3. loudnate commented on Jun 6, 2016

    @loudnate
    Collaborator

    It's available in the plist file in the encrypted binary package downloaded by iTunes. Find the ipa file in finder, rename it to .zip, and uncompress it. Find the bundle in the Payload directory, and open it using the "Show Package Contents" context menu option. Inside there should be a file called Info.plist, and any supported URL schemes are under the CFBundleURLSchemes key.

    On Jun 6, 2016, at 11:38 AM, Chris Hannemann notifications@github.com wrote:

    I do not; is this something you can only find by examining the source code,
    or is it publicly exposed?

    On Mon, Jun 6, 2016 at 11:25 AM, Nathan Racklyeft notifications@github.com
    wrote:

    Do you know what the URL scheme is to open the G4 app?

    On Jun 6, 2016, at 10:36 AM, Chris Hannemann notifications@github.com
    wrote:

    Currently, a single tap on the status screen's glucose chart opens the
    Dexcom G5 app. If the user is instead using a G4, is would to preferable to
    open the G4 app (Share 2).

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

    —
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub
    #20 (comment), or mute
    the thread
    https://github.com/notifications/unsubscribe/AFI0iDqkzh7u-PWrEmci5TuOKSqJ39Dnks5qJGYJgaJpZM4IvImH
    .

    Chris Hannemann
    chris.hannemann@gmail.com
    —
    You are receiving this because you commented.
    Reply to this email directly, view it on GitHub, or mute the thread.

  4. channemann commented on Jun 6, 2016

    @channemann
    CollaboratorAuthor

    I don't see the CFBundleURLSchemes key, but under URL types > Item 0, there is URL identifier of com.dexcom.Share2. Is that what is needed?

  5. loudnate commented on Jun 6, 2016

    @loudnate
    Collaborator

    It's there: dexcomshare

  6. loudnate commented on Jun 6, 2016

    @loudnate
    Collaborator

    Would you be interested in making this change? You can copy the logic that already exists and add an else if condition. You'll also need to add the scheme to the LSApplicationQueriesSchemes array in Loop's Info.plist.

  7. channemann commented on Jun 6, 2016

    @channemann
    CollaboratorAuthor

    I can give it a shot. Am I right that the conditional would be here:

    https://github.com/loudnate/Loop/blob/master/Loop/View%20Controllers/StatusTableViewController.swift#L561

    In which case, how do I determine whether the user has a G4 or G5? I actually have both apps on my phone, so it successfully goes to the G5 apps even though I have no reason to be there right now.

  8. loudnate commented on Jun 7, 2016

    @loudnate
    Collaborator

    well then I'd suggest you delete the G5 app from your phone if you're not using it 😄
    I'd rather keep the logic simple rather than digging in the device configuration from the status screen and say:

    IF (G5 app installed) THEN open(G5 app)
    ELSE IF (G4 app installed) THEN open(G4 app)
    

    You can use the canOpenURL method in each if condition:

    if let URL = NSURL(string: "dexcomcgm://") where UIApplication.sharedApplication().canOpenURL(URL)
  9. added this to the 0.3.0 milestone on Jun 9, 2016
  10. added a commit that references this issue on Aug 8, 2018
  11. added a commit that references this issue on Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions