Browsed by
Category: Firebase

Firebase: A config file was found, but it indicates a project ID “priokotha-92c0e” that you dont appear to have access to. Request access or delete the file in order to proceed with the connection process.

Firebase: A config file was found, but it indicates a project ID “priokotha-92c0e” that you dont appear to have access to. Request access or delete the file in order to proceed with the connection process.

This error will occur if you are signed in to Android Studio and the Firebase Console with different accounts. In Android Studio, click on the small profile icon in the upper right corner to see your sign-in account. Do the same for the Firebase Console tab of your browser. If they are different, sign out and sign in to make them the same.    

Android firebase Phone verification authentication – OTP

Android firebase Phone verification authentication – OTP

Step 1 : Go to firebase console . Go SIGN-IN METHOD and enable phone authentication option .   Step 2 : Open your build.gradle (app) and paste this firebase ui gradle and sync . Check firebase version code . It may vary . compile ‘com.firebaseui:firebase-ui-auth:3.1.0’ compile ‘com.google.android.gms:play-services-auth:11.4.2’ Step 3 : private static final int RC_SIGN_IN = 123; Step 4 : Paste this on OnCreate method . FirebaseAuth auth = FirebaseAuth.getInstance(); if (auth.getCurrentUser() != null) { AuthUI.EXTRA_DEFAULT_NATIONAL_NUMBER.toString(); // SavedData.user = auth.getCurrentUser().toString();…

Read More Read More

Error:Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Error:Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

It may causes for several reasons – I have found 2 reason and solution .  Problem 1 : If you use firebase service and it’s gradle version are older version . Or google play service , gms service are not updated version that can create this problem . Solution : Update all gradle version updated and same version for firebase . Problem 2 :  If multidex not enabled Solution :  Android Multi-dex Enable  

Firebase for android – Insert value as a list data

Firebase for android – Insert value as a list data

Part : one – Go to firebase console and click database . If you want to insert database without authentication then go to database->rules tab and { “rules”: { “.read”: “auth == null”, “.write”: “auth == null” } } Part 2 : Create Model . I used Notes Model /** * Created by ADN Digital on 12/24/2017. */ public class Notes { public String id; public String title; public String description; public String date; public String day; public String currentDate; public…

Read More Read More

Firebase for android : Read list of data from database and show on recyclerview

Firebase for android : Read list of data from database and show on recyclerview

Part -1 : Take that we have some data field on child node named “user” . We will first retrieve all data and then we will show it on recyclerview. , public class UserListActivity extends AppCompatActivity { private DatabaseReference mDatabase; ArrayList<User> userArrayList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_user_list); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); mDatabase = FirebaseDatabase.getInstance().getReference(); mDatabase.child(“user”).addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot snapshot) { Toast.makeText(UserListActivity.this, snapshot.toString(), Toast.LENGTH_SHORT).show(); @Override public void onCancelled(DatabaseError databaseError) { System.out.print(databaseError.toString()); } });…

Read More Read More

Firebase for android : Part One – Project setup

Firebase for android : Part One – Project setup

First of all you can get total setup manual from here . https://firebase.google.com/docs/android/setup I am describing here step by step : Part 1 : First create an android project . If already have then no need . We need project package name . Part 2 :  Go to firebase console to create a project . You need a gmail account . https://console.firebase.google.com/ . Add new project . Give project name and enter create project . I named test-project .   Part…

Read More Read More

Android Push Notification Using Firebase

Android Push Notification Using Firebase

Firebase is a very nice services of Google specially for mobile   platform . Apps developer can do many things simply . Firebase has several features including real-time database , hosting, messaging , notifications ,analytics , app-linking ,admob and so on . I will discuss here push notification using firebase including big image notification. Firebase Account and Project Creation :  Go to firebase console and login with gmail account and  press button ‘Create New Project’ Give your project Name and select country and…

Read More Read More