Ejemplo n.º 1
0
    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);

        // Create your application here
        SetContentView(Resource.Layout.layout2);

        FirebaseAuth mAuth = FirebaseAuth.Instance;
        FirebaseUser user  = mAuth.CurrentUser;

        if (user == null)
        {
            var result = mAuth.SignInAnonymously();
        }

        FirebaseDatabase database = FirebaseDatabase.Instance;

        dbRef = database.GetReference("mygallery");

        FirebaseStorage storage = FirebaseStorage.Instance;
        //create child reference
        StorageReference storageRef = storage.Reference;

        imagesRef = storageRef.Child("images");

        Button btn = FindViewById <Button>(Resource.Id.createdb);

        btn.Click += Btn_Click;
    }