Giter VIP home page Giter VIP logo

firebase.xamarin's People

Contributors

b8ne avatar joseotavioq avatar rlamasb avatar se1exin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firebase.xamarin's Issues

HandleTargetEvent: UnhandledException PostAsyn

Hey good day i am using simple rule in firebase {
"rules": {
".read":"auth != null",
".write":"auth != null"
}
}
my Login using FirebaseAuth
auth.SignInWithEmailAndPassword(email, password)
.AddOnCompleteListener(this, this);

Get Token Using
var mToken = FirebaseInstanceId.Instance.Token;

            var firebase = new FirebaseClient(PageFirebaseSettings.FirebaseDbUrl);
            var account = new Accounts
            {
                uid = PageRandomKeys.AlphaNumericKeys(),
                email = email,
                homecity = homeCity
            };
            var item = await firebase
              .Child(PageTables.TableAccountProfile)
              .WithAuth(mToken)
              .PostAsync(account);

but i receive UnhandledException which part did i miss? Thanks a lot

Firebase.Xamarin nuget package is not installing.

Please take a look on your package while installing i am facing these errors because of latest android API level has no support of your package. Please release a latest version of your package that compatible with latest API levels.

Error NU1202 Package Firebase.Xamarin 0.3.6 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package Firebase.Xamarin 0.3.6 supports: net (.NETFramework,Version=v0.0)

Http status code 400 bad request when trying to use google oauth login

Hi,

I'm having issues when trying to login with the google oauth authenication.
I'm getting a HttpRequestException: 400 (Bad Request)

Could you maybe tell me exactly where to find the firebase API key? Maybe I'm using the wrong one.

The accesstoken is the token that I got from the google login using the Xamarin.auth package so I think I'm ok on that front.

To provide you with some more context I'm using this code in the PCL project of my solution. I'm also using mvvmcross for this.

My Code:

var authProvider = new FirebaseAuthProvider(new FirebaseConfig("My token from firebase console"));
var auth = await authProvider.SignInWithOAuthAsync(FirebaseAuthType.Google, accessToken);

OrderBy not ordering the data

In the source code it is stated that "this is used mainly for following filtering queries and due to firebase implementation the data may actually not be ordered." Does that mean there is no way to sort the data?

package loading error

error I get: Severity Code Description Project File Line Suppression State
Error NU1202 Package Firebase.Xamarin 0.3.6 is not compatible with monoandroid81 (MonoAndroid, Version = v8.1). Package Firebase.Xamarin 0.3.6 supports: net (.NET Framework, Version = v0.0)

PutAsync vs PostAsync

hi. im current fiddling with putasync vs postasync and have some issues with it.

it seems like...
postAsync() > adding a new obj into firebase and return a obj
putAsync() > add/update obj and return void.

can I check how do I know if a new data is inserted/updated using putAsync()?
-data inserted new can return a obj like postAsync()?
-return some kind of value is show if data is inserted or updated?

updates: on a side note, i cant seem to be able to find OrderByKey() in the xamarin studio's 'intellisense'. any idea how to implement it?

get data with parameter

Hi

I m new in xamarin.forms and new in firebase also , how can I get only one data with parameters , I mean something like
select users from mydb where users.name ="erman" and users.active =1

Thanks for developing this nuget package .

BAD request 400

I'm trying to write with user authentication, as with the rules of the default server. auth! = null ...
using the basic method you propose, I have the error BAD 400 ...
can you help me?

var item = await firebase
.Child("yourentity")
.WithAuth(auth.FirebaseToken)
.PostAsync(new YourObject());

How to know if the password is incorrect in login?

When I login with SignInWithEmailAndPasswordAsync() I get a Bad Request exception.

I have the same issue with CreateUserWithEmailAndPasswordAsync(), where I don´t know if the email is registered previously, only get a Bad Request.

Thanks.

How to enable Offline database?

I tried to enable Offline database for get data when network connection is not available.
Is it possible with this framework?
Not? Any solution for this?

Thanks

firebase storage addition

set-up-lab has implemented a dotNET library for firebase storage i was hoping u can add it to this xamarin adaptation... or guide me through the process ... i would gladly hire you to do that if you are busy

I can not query.

I' use Xamarin.Forms and I just want to query. but I keep seeing this error that 'An unhandled exception occured.'
Do not you use this plugin on Xamarin.Forms?

    async private void Load_Clicked(object sender, EventArgs e)
    {
        await LoadData();
        
    }
    public class FirebaseMemo
    {
        public string Memo { get; set; }
    }

    private async Task LoadData()
    {
        
        var firebase = new FirebaseClient("https://xamarinproject-176e8.firebaseio.com/");
        var items = await firebase
            .Child("Memovalue")
            .OnceAsync<FirebaseMemo>();

        foreach (var item in items)
        {
            FirebaseMemo Acc = new FirebaseMemo();
            Acc.Memo = item.Object.Memo;
            TextLabel.Text = Acc.Memo;

        }
    }

How do you do an update?

When you map a subscription to an ObservableCollection of POCO objects, they don't have a property for the "key". How would you get the relevant key to perform an update back in firebase?

        var changedTodo = observableCollection.First();
        changedTodo.Completed = true;
        changedTodo.Description = "Modified Text Here";

        var key = ????

        todosRealTimeDb.Put(key, changedTodo);

Set http request timeout

Is there way to set http request timeout for auth provider and firebase clien? Default timeout is too long for my app.

Delay with Firebase.Xamarin.Database.Streaming?

Hi,

I've been scratching my head for the past several hours with regards to observing/subscribing to a child/key. I see the changes via the Firebase DB, but on the client, I've noticed a delay of upwards to 40 seconds when listening for changes, which doesn't seem very real time to me.

I'm not sure if it's this library or RX.Net that's causing the delay.

Here's what I got; pretty standard:

_currentUserObserver = firebase
  .Child(Keys.Users)
  .WithAuth(authToken)
  .AsObservable<Dictionary<string, object>>()
  .Where(f => !string.IsNullOrEmpty(f.Key))
  .Where(f => f.Key == CurrentUser.Key)
  .Subscribe(d => Debug.WriteLine("Observing"));

I've played around with some of the RX.Net LINQ statements, such as .Sample(TimeSpan.FromSeconds(1)) or .Throttle(timeSpan), but no luck. Reference: http://stackoverflow.com/questions/3211134/how-to-throttle-event-stream-using-rx

Any thoughts?

PostAsync - 401 Unauthorized

Hey there,
I was just testing the API and I experienced that after a successful authentication:

  • Querying works fine with the acquired auth token
  • PutAsync works fine with the acquired auth token
  • PostAsync does not work with the acquired auth token, it returns a 401 - Unauthorized http status code.

When I set the database rule on firebase to:
.write == null
It obviously works without using the auth token, but thats a bit risky.. :)

Do you have any idea, why doesn't this work when I'm trying to use Post? :)

Thanks!

OrderBy returning Bad Request

I want to OrderByChild but when I try it I got an exception of Bad Request

var fEvents = await client.Child("events").OrderBy("DateMilliseconds").OnceAsync();

when I use OrderByKey it works perfectly

Not able to use Firebase.Xamarin.Auth

Hi

I am extremely sorry that I have to create new issue but I don't have option to ask.
Can you please suggest me How I can use Authentication module of Firebase.Xamarine.Auth.
I have created project in firebase I have database and database rules over there.

How to check if user has log in?

Anyone known hoy to check if user log in.
Step 1, create user.
Step 2, login user. Then close the app
Step 3, check if user had log in..

Additional Documentation

Is there any documentation on how to use the Offline Database with this library?

Also, the .WithAuth(...) documentation seems to be incorrect, as this method cannot be chained from .Child('...').

Will updates to the documentation be made to clarify these issues?

Thanks!

Problem with realtime db

I cannot figure out how to get realtime data. I can get one at a time, but there is no notification saying that the data is finished updating. Can anyone show me how to do it so that I'll know when all the data has come in? Or can it give me a collection of items instead of one at a time?

CS0234

When I add your NuGet package and trying to build, an error arrises as shown in the image attached. I don't even include it in my code, and the build fails.
screen shot 2016-09-09 at 8 20 26 pm

Firebase Auth with id & password

i am able to authenticated with fb, google auth, but not able to use fcm authentication i.e by just entering id & password
please help

Get token for individual sending (IOS)

Hello,
I am trying at the moment to send a notification to a specific iphone device.
I succeed sending the notification in broadcast using group id (unique identifier for app).
I am now trying to send a notification to a specific device using FCM token.
I tried getting the token using this code:
public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken) { var DeviceToken = deviceToken.Description; }

but it looks like it's not the token needed.
Here is the place where the token is asked:
https://ibb.co/ejr66o
How can I get the good token?
Thank you.

Offline DataBase

How I use the offline database control? is able to you include some readme about that?
I did the code bellow to include a Class Account:

try{

var item = await firebase.Child("users").PostAsync(user);
list_users.Add(user);
await LoadAdpterList();
}catch(Exception e){

list_users.Add(user);
await LoadNovo();
}
I made the following test:
include an user with internet(ok)
disabled internet
include an user without internet
- include on my listview (ok)
enable internet(ok)

but the user that was includeded on list didn't sync again. Even if I include another user. How i do it?

Is it possible to do phone authentication?

I need to authenticate the phones of users. Is this possible with this plugin?
I tried the firebase phone authentication for web and it's working fine so I tough of using it in a web view until I saw this promising plugin.

login never returns

Hi

I use version 0.3.6 from nuget.

If I try to login

 FirebaseAuthProvider authProvider = new FirebaseAuthProvider(new FirebaseConfig("MyAPIKeyHere"));
 FirebaseAuthLink user = await authProvider.SignInWithEmailAndPasswordAsync("email", "password");

it the sign in never returns.
No error message, debugger waits and waits and waits

User persistence

I try to login my users with email and password, I do this for get my user and it's works for now:

options = new FirebaseOptions.Builder()
                .SetStorageBucket(".appspot.com")
                .SetApplicationId("")
                .SetApiKey("")
                .SetDatabaseUrl("https://.firebaseio.com")
                .SetGcmSenderId("")
                .Build();

            app = FirebaseApp.InitializeApp(Android.App.Application.Context, options);
            authProvider = new FirebaseAuthProvider(new FirebaseConfig(options.ApiKey));
firebaseAuth = await authProvider.SignInWithEmailAndPasswordAsync(e, p);
                name.Text = firebaseAuth.User.DisplayName;

But, how I persist this user for get the name or other infos in other page?
And the mostly important, how I can close my app and verify if my user is logged when I open again?
I using Xamarin.Forms in Cross Platform
PS. I hide the options infos.

Authentication exceptions

There are some cases, like register with an email that is already registered and signing in with a wrong password, that the library only return a HTTPRequestException with the message of "BAD Request 400". I've checked FirebaseAuthentication.net and it seems like they have a FirebaseAuthenticationException that will provide more information for easier debugging, but it seems like it's not exposed in Firebase.Xamarin. I'm developing on Xamarin and I can't install FA.net to it, so I can't know for sure. Are there plans to expose the exception or to implement equivalent facilities in Firebase.Xamarin?

Sign in with Twitter token throws '400: Bad request'

Hi. I'm using Facebook and Twitter for login into my app. Facebook works fine. But when I'm trying to login with Twitter I always have '400: Bad request'.
My code is:

_authData = await _authProvider.SignInWithOAuthAsync(FirebaseAuthType.Twitter, token);

In this code 'token' is string that I got from Fabric Twitter SDK, it looks like: "token=,secret=".

Could you please help me find what's the problem, what am I doing wrong?

Observer subscription not working

I have a problem with the observer subscription of my firebase database. I subscribe my Listview to the realtime database of firebase with the following lines of code. I request the firebaseclient to give me an observer of the database, which I then ask to listen to any changes made in the database. If there are changes do the following.

Observer = firebase.Child("users").AsObservable<Account>();
List<Account> accountsFromDB = new List<Account>();
Observer.Subscribe(next => 
                    { 
                        accountsFromDB.Add(account.Object); 
                    }, 
                error => { Debug.WriteLine("error"); }, 
                onCompleted => 
                    { 
                        adapter.setData(accountsFromDB);
                        adapter.NotifyDataSetChanged(); 
                    }
                );

So when a change happens in the database the "next" will fetch every item in the database and add to the list, this works fine. After everything is collected from the database the "error" or "onCompleted" action should be called but aren't. Can someone help me understand this issue?

How to listen to changes to the database?

I have implemented what you did in the RealtimeStreaming example, but the function is never invoked. Why is that? Is this the method used to listen to changes in the database?

Samples?

Does anyone have a basic Xamarin sample (e.g. todo list) that does Realtime and Offline? I'm struggling to get all the objects working together correctly.

Saving data

Congratulations for the work.
I am not able to save the application on RealTimeData
I used the example of Saving data and does not save the bank.
You can help me?

sorry, it was a rookie mistake 👍

"Response status code does not indicate success: 400 (Bad Request)."

i am able to get a token, but I am getting a generic 400 error with the following code:

var authProvider =
                    new FirebaseAuthProvider(new FirebaseConfig("--My API Key--"));
                var auth = await authProvider.SignInWithEmailAndPasswordAsync(username, password);

                var firebase = new FirebaseClient("https://mydbname.firebaseio.com/");
                var user = new LocalUser();
              var xx = await firebase.Child("Users").Child(username).WithAuth(auth.FirebaseToken).PostAsync(user,false).ConfigureAwait(true);

and the LocalUser is defined as:

public class LocalUser
    {       
        public string SomeData = "MoarData";
    }

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.