firebase-realtime-database

How do I lock down Firebase Database to any user from a specific (email) domain?

。_饼干妹妹 提交于 2020-03-24 00:04:17
问题 I have a small, personal Firebase webapp that uses Firebase Database. I want to secure (lock down) this app to any user from a single, specific domain. I want to authenticate with Google. I'm not clear how to configure the rules to say "only users from a single, specific domain (say @foobar.com ) can read and write to this database". (Part of the issue that I see: it's hard to bootstrap a Database with enough info to make this use case work. I need to know the user's email at the time of

Android Firebase Database exception: not define a no-argument constructor

╄→гoц情女王★ 提交于 2020-03-23 04:04:12
问题 I'm receiving an error presented below: com.google.firebase.database.DatabaseException: Class com.example.admin.albumsviewer.Album$Info does not define a no-argument constructor. If you are using ProGuard, make sure these constructors are not stripped. In fact in my model class I have declared no-argument constructors: package com.example.admin.albumsviewer; import java.util.ArrayList; import java.util.List; public class Album { String nazwa; String wykonawca; String okladkaAlbumu; String

Android Firebase Database exception: not define a no-argument constructor

强颜欢笑 提交于 2020-03-23 04:02:36
问题 I'm receiving an error presented below: com.google.firebase.database.DatabaseException: Class com.example.admin.albumsviewer.Album$Info does not define a no-argument constructor. If you are using ProGuard, make sure these constructors are not stripped. In fact in my model class I have declared no-argument constructors: package com.example.admin.albumsviewer; import java.util.ArrayList; import java.util.List; public class Album { String nazwa; String wykonawca; String okladkaAlbumu; String

Android Firebase Database exception: not define a no-argument constructor

↘锁芯ラ 提交于 2020-03-23 04:02:23
问题 I'm receiving an error presented below: com.google.firebase.database.DatabaseException: Class com.example.admin.albumsviewer.Album$Info does not define a no-argument constructor. If you are using ProGuard, make sure these constructors are not stripped. In fact in my model class I have declared no-argument constructors: package com.example.admin.albumsviewer; import java.util.ArrayList; import java.util.List; public class Album { String nazwa; String wykonawca; String okladkaAlbumu; String

Retrieving user profile data from firebase and displaying

时光怂恿深爱的人放手 提交于 2020-03-22 10:28:11
问题 Im creating user profile in firebase with this code: username: string msgnumber: number level: number constructor(private fire:AngularFireAuth,private db :AngularFireDatabase,public navCtrl: NavController, public navParams: NavParams) { } createProfile() { this.fire.authState.take(1).subscribe(auth => { this.db.object(`profile/${auth.uid}`).set({ username: this.username, msgnumber: 0, level: 0 }).then(() => this.navCtrl.setRoot(TabsPage)); }) } It is working. Now I'm trying to take the data

I can't get markers from firebase

穿精又带淫゛_ 提交于 2020-03-21 11:04:12
问题 When i start thist activity my app stopping.I need get coordinates from databes and place marker. I don't know where is problem. My database: public class MapsActivityUser extends FragmentActivity implements OnMapReadyCallback { private GoogleMap mMap; DatabaseReference f_database = FirebaseDatabase.getInstance().getReference(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps_user); SupportMapFragment

How to store custom object in Firebase with Swift?

橙三吉。 提交于 2020-03-21 07:04:42
问题 I'm porting an android app and using firebase in android it is possible to save a format in this way. How can i do this on Swift? I read that i can store only this kind of data NSString NSNumber NSDictionary NSArray How can I store the obj in atomic operation? It's correct to store every field of the user object in separate action? Firebase on Android mDatabaseReferences.child("users").child(user.getUuid()).setValue(user) 回答1: I generally store objects as dictionaries on firebase. If, within

How to store custom object in Firebase with Swift?

强颜欢笑 提交于 2020-03-21 07:04:00
问题 I'm porting an android app and using firebase in android it is possible to save a format in this way. How can i do this on Swift? I read that i can store only this kind of data NSString NSNumber NSDictionary NSArray How can I store the obj in atomic operation? It's correct to store every field of the user object in separate action? Firebase on Android mDatabaseReferences.child("users").child(user.getUuid()).setValue(user) 回答1: I generally store objects as dictionaries on firebase. If, within

How to Display The Current Logged In User Firebase

橙三吉。 提交于 2020-03-18 05:31:34
问题 mAuth = FirebaseAuth.getInstance(); mFirebaseDatabase = FirebaseDatabase.getInstance(); myRef = mFirebaseDatabase.getReference().child("Users"); FirebaseUser user = mAuth.getCurrentUser(); userID = user.getUid(); mAuthListener = new FirebaseAuth.AuthStateListener() { @Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) { FirebaseUser user = firebaseAuth.getCurrentUser(); if (user != null) { // User is signed in Log.d(TAG, "onAuthStateChanged:signed_in:" + user.getUid()

How can I avoid code duplication when getting data from Firebase (android)?

邮差的信 提交于 2020-03-18 03:05:39
问题 I'd imagine this question would apply to any application that uses asynchronous calls. I'm relatively new to all this, and the problem I'm having is with with fetching data from Firebase to my Android application. There are several classes throughout the application that need to use data from the "users" table in the database, which I obtain as follows: DatabaseReference reference = FirebaseDatabase.getInstance().getReference() .child("users").child("exampleDataFromUsers"); reference