These are chat archives for angular/angular-2-ionic-2

29th
May 2017
Prajwal GP
@prajwalgp
May 29 2017 07:05
@RDalziel When routing is used with Split pane the view is fluttering
RDalziel
@RDalziel
May 29 2017 07:34
@prajwalgp Not sure what you mean
I guess the root of what i'm trying to achieve is less about urls, but i'd like to maintain state on AppResume - i had assumed this was part of the battle
Can't seem to find any examples where state is maintained on app resume
Tom McKearney
@tommck
May 29 2017 14:50
anyone used google drive integration with Ionic2?
Tom McKearney
@tommck
May 29 2017 15:24
simpler question: I'm trying to use this: https://github.com/JcDenton86/cordova-plugin-jc-googledrive How do I use it? I did an "ionic add plugin cordova-plugin-jc-googledrive" and that seemed to work. I just don't know how to "import" the feature
"window.plugins" doesn't even exist, so I'm really confused
UncertaintyP
@UncertaintyP
May 29 2017 15:34
What version do you use?
Tom McKearney
@tommck
May 29 2017 15:34
ionic3
and latest version of the plubin
plugin
UncertaintyP
@UncertaintyP
May 29 2017 15:42

This could be rough, I don't use it but my guess is you

import * as GoogleDrive from 'cordova-plugin-jc-googledrive'

and then you should be able to use GoogleDrive.uploadFile and so on

if the node module is not present install it via npm install --save cordova-plugin-jc-googledrive
Tom McKearney
@tommck
May 29 2017 15:47
the package isn't set up with an index.js or anything.
Uncaught Error: Cannot find module "cordova-plugin-jc-googledrive"
the module's installed, just doesn't adhere to normal npm package stuff.
UncertaintyP
@UncertaintyP
May 29 2017 15:48
Oh, that is bad :(
Tom McKearney
@tommck
May 29 2017 15:49
then again... cordova-plugin-device doesn't have an index.js either.. not sure how this stuff's supposed to work
UncertaintyP
@UncertaintyP
May 29 2017 15:51
But it does module.exports = new Device(); I see now there is no export in your plugin
Tom McKearney
@tommck
May 29 2017 15:52
yeah.. I don't know what's going on
UncertaintyP
@UncertaintyP
May 29 2017 15:53
Its only installing for Cordova you may try experimenting by exporting the function.
Tom McKearney
@tommck
May 29 2017 15:54
I did, but it didn't work.. it still tells me that the module doesn't exist
I'm wondering if the package.json is set up right
it has this:
    <js-module src="www/googleDrive.js" name="GoogleDrive">
        <clobbers target="window.plugins.gdrive" />
    </js-module>
in the plugin.xml
device has this:
    <js-module src="www/device.js" name="device">
        <clobbers target="device" />
    </js-module>
UncertaintyP
@UncertaintyP
May 29 2017 15:58
you may have a look at https://github.com/EddyVerbruggen/cordova-plugin-googleplus which is pretty similar
Tom McKearney
@tommck
May 29 2017 15:59
it's possible that this plugin hasn't been updated to any recent versions of cordova. I don't know. I'm a n00b when it somes to this stuff
UncertaintyP
@UncertaintyP
May 29 2017 16:02
Anything for Google Drive on the forums?
Tom McKearney
@tommck
May 29 2017 16:41
I haven't run across anything useful. Doesn't help that there are multiple versions of the google apis and that some approaches are being deprecated (like the in app browser usage for getting oauth token)
jjohnson1994
@jjohnson1994
May 29 2017 20:07

Hello, has anybody used the deep-link extension?

I'm trying to use in in my app but I get the error Got a deeplink that didn't match

My deep-link code in app.component.ts

deeplinks.route({
                "/spotify-callback": SpotifyCallbackPage
            }).subscribe((match) => {
                // match.$route - the route we matched, which is the matched entry from the arguments to route()
                // match.$args - the args passed in the link
                // match.$link - the full link data
                console.log('Successfully matched route', match);
            }, (nomatch) => {
                // nomatch.$link - the full link data
                console.error('Got a deeplink that didn\'t match');
                console.log(nomatch);
            });

When I go to the URL https://myapp.com/spotify-callback/, my app is opened so I know the deep-link is working but when the app opens I get an error.

Full error message:

[18:30:49]  error opening ws message: {"category":"console","type":"log","data":["On deep 
            link",{"url":"https://myapp.com/spotify-callback/#access_token=random-access-tokentoken_type=Bearer&expires_in=3600","path":"/spotify-callback/","scheme":"https","host":"myapp.com","fragment":"access_token=random-access-token&token_type=Bearer&expires_in=3600","extra":{"org.chromium.chrome.browser.eenp":["io.ionic.starter"],"org.chromium.chrome.browser.referrer_id":26,"com.android.browser.application_id":"com.android.chrome"}}]}
[18:30:49]  console.error: Got a deeplink that didn't match

Thanks in advanced for any help

Edit, object keys and values of nomatch
https://files.gitter.im/angular/angular-2-ionic-2/ojUL/blob

blob
blob
jjohnson1994
@jjohnson1994
May 29 2017 20:22

Update, If I call the URL from the command line and with no URL parameters the route is matches successfully.

e.g. running adb shell am start -W -a android.intent.action.VIEW -d "https://myapp.com/spotify-callback/" com.example.android

Is this because there are no URL parameters?