Giter Club home page Giter Club logo

Comments (9)

halukmy avatar halukmy commented on July 20, 2024

@Redth & @jamesmontemagno any update?

from xamarinawareness.

Redth avatar Redth commented on July 20, 2024

Please try and use .Build () on the builder, and .Connect() on the resulting API Client, and implement the API that way instead of .BuildAndConnectAsync () for now. There may be an issue with .BuildAndConnectAsync () which is something I'm investigating...

from xamarinawareness.

halukmy avatar halukmy commented on July 20, 2024

var _clientc = new GoogleApiClient.Builder(this).AddApi(Awareness.Api).Build();
_clientc.Connect();

              Toast.MakeText(this, _clientc.IsConnected.ToString(), ToastLength.Long).Show();

i made this @Redth but still with problem

did i use sytnax right?

from xamarinawareness.

Redth avatar Redth commented on July 20, 2024

No, more like this:

public class MainActivity : AppCompatActivity, GoogleApiClient.IConnectionCallbacks, GoogleApiClient.IOnConnectionFailedListener
{
	GoogleApiClient googleApiClient;

	protected override void OnCreate(Bundle savedInstanceState)
	{
		base.OnCreate(savedInstanceState);

		// Set our view from the "main" layout resource
		SetContentView(Resource.Layout.Main);

		googleApiClient = new GoogleApiClient.Builder(this)
			.AddConnectionCallbacks(this)
			.AddOnConnectionFailedListener(this)
			.AddApi(Awareness.Api)
			.Build();

		googleApiClient.Connect();
	}

	public void OnConnected(Bundle connectionHint)
	{
		Toast.MakeText(this, $"Connected: {googleApiClient.IsConnected}", ToastLength.Long).Show();
	}

	public void OnConnectionFailed(ConnectionResult result)
	{
		Toast.MakeText(this, "Connection Failed!", ToastLength.Long).Show();
	}

	public void OnConnectionSuspended(int cause)
	{
		Toast.MakeText(this, "Connection Suspended!", ToastLength.Long).Show();
	}
}

from xamarinawareness.

halukmy avatar halukmy commented on July 20, 2024

sadly i get this An unhandled exception occured.

from xamarinawareness.

Redth avatar Redth commented on July 20, 2024

Going to need more info... Stack traces, etc.

from xamarinawareness.

halukmy avatar halukmy commented on July 20, 2024

my vs17 get lose itself,

@Redth

after googleApiClient.Connect(); row,

unable to manage try catch blog

just outline is https://jpst.it/WQmD

can you share working awareness sample ?

from xamarinawareness.

halukmy avatar halukmy commented on July 20, 2024

@Redth any update or any working awareness api?

im planing to run xamarin smart app in smart city applications i need to hurry about it

from xamarinawareness.

Redth avatar Redth commented on July 20, 2024

I can't reproduce any issues here. I think @jamesmontemagno should close this issue. We were already tracking this issue here: xamarin/GooglePlayServicesComponents#51

I've closed the original issue as well since I can't reproduce the issue and nobody has provided any more information about how to do so given the code I've provided.

Thanks

from xamarinawareness.

Related Issues (2)

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.