Skip to content
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

'void com.vimeo.networking.GsonDeserializer.deserialize #398

Open
DhirajG opened this issue Aug 30, 2019 · 1 comment
Open

'void com.vimeo.networking.GsonDeserializer.deserialize #398

DhirajG opened this issue Aug 30, 2019 · 1 comment
Labels

Comments

@DhirajG
Copy link

DhirajG commented Aug 30, 2019

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.vimeo.networking.GsonDeserializer.deserialize(com.google.gson.Gson, java.lang.Object, com.vimeo.networking.callbacks.ModelCallback)' on a null object reference
        at com.vimeo.networking.VimeoClient$5.success(VimeoClient.java:1169)
        at com.vimeo.networking.callbacks.VimeoCallback.onResponse(VimeoCallback.java:55)
        at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:201)
        at android.app.ActivityThread.main(ActivityThread.java:6810)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
var configBuilder = Configuration.Builder(VimeoHelper.clientId, VimeoHelper.clientSecret, VimeoHelper.SCOPE)
    .setCacheDirectory(activity?.getCacheDir())


VimeoClient.initialize(configBuilder.build());
VimeoClient.getInstance().authorizeWithClientCredentialsGrant(object : AuthCallback {
    override fun success() {
        vimeoClient = VimeoClient.getInstance();
        playVideo();
    }

    override fun failure(error: VimeoError?) {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }
})


vimeoClient ?.fetchNetworkContent("/videos/354539932", object : ModelCallback<VideoList>(com.vimeo.networking.model.VideoList::class.java) {
    override fun success(video: com.vimeo.networking.model.VideoList?) {
        Helper.setLog(TAG,"success")
    }

    override fun failure(error: VimeoError) {
        Helper.setLog(TAG,"failure"+error.developerMessage)
    }
})
@anthonycr anthonycr added the bug label Sep 5, 2019
@Vishal12796
Copy link

Vishal12796 commented Dec 24, 2019

intialize the Configuration.Builder with this parameter in "getClientIdAndClientSecretBuilder()"

    GsonDeserializer gsonDeserializer = new GsonDeserializer();
    ModelCallback<Object> videoModelCallback = new ModelCallback<Object>(Object.class) {
        @Override
        public void success(Object video) {  }

        @Override
        public void failure(VimeoError error) { }
    };
    gsonDeserializer.deserialize(new Gson(), new Object(), videoModelCallback);

    Configuration.Builder configBuilder =
            new Configuration.Builder(clientId, clientSecret, SCOPE, null, gsonDeserializer);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants