Google+ signin java binding library and jar in Mono Android

edited April 2013 in Xamarin.Android

Hi,

Could anyone guide me in how to integrate the correct Jar for Google+ sign in in my Mono Android project. I have made a Java binding library project according to Xamarin guide. I think I have found the correct Jar to bind against (I use EmbeddedJar in properties). Ref. https://code.google.com/p/google-api-java-client/wiki/APIs#Google+_API

but I'm not able to make simple signin Button according to this : https://developers.google.com/+/mobile/android/sign-in

<com.google.android.gms.common.SignInButton
    android:id="@+id/sign_in_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

I can build my project but get inflate error when setting up my login view. Probably the class is unknown

If I include this in my manifest:

<uses-library android:name="com.google.api.services.plus" />

I get Deployment failed because of an internal error:

Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]:  

In Metadata i make this conversion

<attr path="/api/package[@name='com.google.api.services.plus']" name="managedName">Android.Api.Services.Plus</attr>

and includes this namespace in my code

using Android.Api.Services.Plus;

Any ideas?

BR, Ole F. Kristensen

Posts

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    You may find this guide helpful in tracking down why com.google.android.gms.common.SignInButton can't be found.

    You should not use <uses-library/> unless you've explicitly been told to; it's presence is used to require that an Android device provide the specified library, and if the device doesn't provide it then installation fails with INSTALL_FAILED_MISSING_SHARED_LIBRARY, which is exactly what you're seeing.

  • edited April 2013

    So I should not specify this

    <uses-library android:name="com.google.api.services.plus" />
    

    In similar way as

    <uses-library android:name="com.google.android.maps" />
    

    /Ole

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    Correct, you should not use <uses-library/> unless you've been specifically directed to do so, which you haven't been.

Sign In or Register to comment.