Giter Club home page Giter Club logo

Comments (3)

hoosr2b2 avatar hoosr2b2 commented on August 29, 2024

Hi @githubmss ! Thanks for reaching out. We will certainly look into the issue you are having. For your other questions could you submit a ticket at https://glympse.zendesk.com/hc/en-us/requests/new and we will be happy to help you get set up with Glympse SDK.
Thanks, Remington!

from glympse-app-sdk.

githubmss avatar githubmss commented on August 29, 2024

Hello @hoosr2b2 , i am running your sample on my Android Studio 3.0 , i am able to run your sample but finding some issue like sdk is not properly working with Studio ,Please refer below dropbox link :-
https://www.dropbox.com/personal?preview=Glympse.png

Project is running but i am not able to get signed inside glympse using any of the account and neither by Skipping login .

i am using this function for facebook :-

public void fbLogin() {
        LoginManager.getInstance().logInWithReadPermissions(this, Arrays.asList(this.getString(R.string.fb_email), this.getString(R.string.fb_public_profile)));
        LoginManager.getInstance().registerCallback(_callbackManager, new FacebookCallback<LoginResult>() {
            @Override
            public void onSuccess(LoginResult loginResult) {
                mSocialFbToken = com.facebook.AccessToken.getCurrentAccessToken().getToken().toString();
                GraphRequest request = GraphRequest.newMeRequest(loginResult.getAccessToken(), new GraphRequest.GraphJSONObjectCallback() {
                    @Override
                    public void onCompleted(JSONObject object, GraphResponse response) {
                        try {
                            GPrimitive profile = GlympseFactory.createFacebookAccountProfile(mSocialFbToken);
                            GlympseWrapper.instance().getGlympse().logout();
                            GlympseWrapper.instance().getGlympse().login(profile);
                            GlympseWrapper.instance().getGlympse().start();

                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                });
                Bundle parameters = new Bundle();
                parameters.putString("fields", "id, name, email, first_name,birthday,last_name,gender");
                request.setParameters(parameters);
                request.executeAsync();
            }

            @Override
            public void onCancel() {

            }

            @Override
            public void onError(FacebookException error) {
                if (error instanceof FacebookAuthorizationException) {
                    if (com.facebook.AccessToken.getCurrentAccessToken() != null) {
                        LoginManager.getInstance().logOut();
                        fbLogin();
                    }
                }
            }
        });
    }

Please refer the bellow link :-

https://www.dropbox.com/s/9ao6pl532pmumiw/glypseFbLoginProcess.png?dl=0

After execution of line :-

GPrimitive profile = GlympseFactory.createFacebookAccountProfile(mSocialFbToken);

Here is what i got in evaluating GPrimitive Object :-

https://www.dropbox.com/s/w6n3fj0l7eq3hnx/glympsecreate.png?dl=0

My debugging got stop at this piece of call back :-

@Override
    public void eventsOccurred(GGlympse glympse, int listener, int events, Object obj) {
        if (GE.LISTENER_PLATFORM == listener) {
            if (0 != (events & GE.PLATFORM_ACCOUNT_CREATE_FAILED)) {
                // Check for a failure to create a Glympse account. This can happen for several reasons,
                // but in this case, it's most likely invalid or expired tokens from a third-party service.
                Toast.makeText(this, "Error: Federated login failed.", Toast.LENGTH_LONG).show();

                setTitle("Account Linking", false);
            }
            if (0 != (events & GE.PLATFORM_SYNCED_WITH_SERVER)) {
                // If we successfully sync with the server, then we have a valid Glympse user account and
                // up-to-date access tokens, so show the "account linking" view from which the user can
                // choose to link new accounts, unlink existing accounts or logout.
                Intent intent = new Intent(this, LinkedAccountsActivity.class);
                startActivity(intent);

                setTitle("Account Linking", false);
            }
        }
    }

Seems something not matching but when i try to evaluate GE.LISTENER_PLATFORM it says unable to find any local variable GE

Please let me know what i need to update or place in my code so that it starts recognizing the following two packages :-

  1. com.glympse.android.api
  2. com.glympse.android.core

Here is my setting.gradle file :-

include ':accountLinkingDemo'
include ':GlympseApi'
project(':GlympseApi').projectDir = new File('../GlympseApi')

Please let me know what i am left with , or what i am doing wrong in this.

from glympse-app-sdk.

githubmss avatar githubmss commented on August 29, 2024

Solved!!! , The problem was with gradle version , the studio was not recognizing imports when gradle version was 3.0.0-alpha3 , when i changed it to com.android.tools.build:gradle:2.2.3' and added distributionUrl=https://services.gradle.org/distributions/gradle-3.5-all.zip in wrapper properties , Studio start recognizing all imports.

from glympse-app-sdk.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.