How to download an image on Firebase Storae with Android Storage?

I did it with a tutorial 2016

I may have changed the settings of Android Studio, but I can not find new videos about it. If you know a channel with updated tutorials, I would appreciate it if you leave it in the description.

private Button mButton;
private FirebaseAuth mAuth;
private TextView nombre;
private DatabaseReference mDatabase;
private ImageView jeje;
private StorageReference mstorage;
private FloatingActionButton uplstorage;
private static final int Gallery_Intent = 2;

protected void onCreate(Bundle savedInstanceState) {

    mAuth = FirebaseAuth.getInstance();
    mDatabase = FirebaseDatabase.getInstance().getReference();
    mstorage = FirebaseStorage.getInstance().getReference().child("bucket");

    uplstorage = (FloatingActionButton) findViewById(;
    mButton = (Button) findViewById(;
    nombre = (TextView) findViewById(;
    jeje = (ImageView) findViewById(;

// This part was only to put the image with a circular border

    Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.usuario);
    RoundedBitmapDrawable roundedBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), bitmap);

// this part consists of selecting the photo in the gallery

    uplstorage.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            Intent intent = new Intent(Intent.ACTION_PICK);

// this is to disconnect

    mButton.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            startActivity(new Intent(Pantallaprincipal.this, Inicio.class));


// Here you can download the photo on Storage

protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if(requestCode == Gallery_Intent && resultCode == RESULT_OK){
        Uri uri = data.getData();
        StorageReference filePath = mstorage.child("bucket").child(uri.getLastPathSegment());
        filePath.putFile(uri).addOnSuccessListener(new OnSuccessListener() {
            public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                Toast.makeText(Pantallaprincipal.this, "Cargado exitosamente",Toast.LENGTH_SHORT).show();


// This part is only used to identify the name of the user with the database

private void getUserInfo() {

    String id = mAuth.getCurrentUser().getUid();
    mDatabase.child("User").child(id).addValueEventListener(new ValueEventListener() {
        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
            if (dataSnapshot.exists()) {
                String name = dataSnapshot.child("nombre").getValue().toString();



        public void onCancelled(@NonNull DatabaseError databaseError) {



I do not know what I'm going to do wrong, can you fix my code?

FCM Firebase Notifications Action Button

How to add an action button to push the notification like this:


I tried this and it does not work:


here is my notification charge:

    "title" =>  "FCM Message",
    "body" => "This is an FCM Message",
    "click_action" => "",
    "icon" => "/logo.jpg",
    "actions" => array(
        0 => array(
            'title' => 'Like',
            'click_action' => '',
            'icon' => 'icons/heart.png',
        1 => array(
            'title' => 'Unsubscribe',
            'click_action' => '',
            'icon' => 'icons/cross.png',

java – How to use AuthStateListener () firebase

I do some research since when, when I delete a user from the Firebase authentication screen, then that I enter in the application from the application that I 'm doing. have on the test phone, the user continues to appear as being authenticated. To solve this problem, I searched the Internet and found the Authstatelistener (). Since I did not understand how it worked, I looked for how to apply it. Below, I leave you the example. Now, I get an error telling me that the mAuthlistener symbol can not be solved. Someone would know how to fix it?

public class MainActivity extends AppCompatActivity {

    private FirebaseAuth mAuth;

    protected void onCreate(Bundle savedInstanceState) {
        mAuth = FirebaseAuth.getInstance();
        mAuthlistner = new FirebaseAuth.AuthStateListener() {
            public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
    public void onStart(){
    public void open_login(){
        Intent open_login_activity = new Intent(MainActivity.this, LoginActivity.class);
    public void open_postlogin(){
        Intent open_postlogin_activity = new Intent(MainActivity.this, Main_postlogin.class);

    private void updateUI(FirebaseUser user){
        if (user  != null){
            String gmail = user.getEmail();
            Toast.makeText(MainActivity.this, gmail, Toast.LENGTH_SHORT).show();


ios – Conditionally View Cloud Firebase Messaging Notification in Applications

The code listed here shows how to display a notification in the application when the application is in the foreground if a Firebase cloud mail message is received. This is in the AppDelegate:

@available(iOS 10, *)
extension AppDelegate : UNUserNotificationCenterDelegate {

  // Receive displayed notifications for iOS 10 devices.
  func userNotificationCenter(_ center: UNUserNotificationCenter,
                              willPresent notification: UNNotification,
    withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
    let userInfo = notification.request.content.userInfo

    // With swizzling disabled you must let Messaging know about the message, for Analytics
    // Messaging.messaging().appDidReceiveMessage(userInfo)

    // Print message ID.
    if let messageID = userInfo(gcmMessageIDKey) {
      print("Message ID: (messageID)")

    // Print full message.

    // Change this to your preferred presentation option

It works, but is there a way for me to conditionally display the managed notification or not? completionHandler((.alert)) based on what ViewController is active? If a certain ViewController is visible, I would like to remove the display of the notification integrated into the application, for example.

React Native IOS – Firebase Authentication The network request failed

I implemented a native rea application with a firebase integration.
Here, the user is logged in anonymously.

I upgraded the native reaction to 0.60 and now the signInAnonymously () function returns an error "The network request failed".
Description: "A network error (such as a delay, a broken connection, or an unreachable host) has occurred."


Here is my firebase.js file:

import * as firebase from 'firebase';
const settings = {};

// Your web app's Firebase configuration
var firebaseConfig = {
  apiKey: "AIzaSyCg**********eRHumnb_iPpeB3yEA",
  authDomain: "**********",
  databaseURL: "https://*********",
  projectId: "*********",
  storageBucket: "**********",
  messagingSenderId: "213******74",
  appId: "1:213******74:web:a******495f2"
// Initialize Firebase

export default firebase;

and my index.js file:

import firebase from "./src/service/Firebase"

firebase.auth().signInAnonymously().catch(function (error) {

And here is my package.json

"dependencies": {
    "@popmotion/popcorn": "^0.4.2",
    "@react-native-community/async-storage": "^1.6.1",
    "@react-native-community/geolocation": "^2.0.2",
    "d3-shape": "^1.3.5",
    "firebase": "^6.5.0",
    "geofirestore": "^3.3.1",
    "native-base": "^2.13.5",
    "randomcolor": "^0.5.4",
    "react": "16.8.6",
    "react-native": "0.60.5",
    "react-native-card-stack-swiper": "^1.1.0",
    "react-native-cardview": "^2.0.3",
    "react-native-easy-grid": "^0.2.2",
    "react-native-elements": "^1.1.0",
    "react-native-firebase": "^5.5.6",
    "react-native-gesture-handler": "^1.4.1",

In my Firebase console, the user is logged in anonymously, but the error still occurs.

I've already read several discussions about a similar problem, but I've done everything described above and nothing is done there.

Can any one help me?

firebase – FirebaseAuth.instance.signInWithEmailAndPassword (email, password) causes floating

Flutter App hangs while running Firebase authentication function signInWithEmailAndPassword

I suggest that the problem has something to do with incompatible versions. But with the lower versions, we have a problem with Androidx.

Future signInWithEmailAndPassword(String email, String password)async{
    FirebaseUser user = (await  _firebaseAuth.signInWithEmailAndPassword(email: email, password: password)).user; //Here it crashes
    return user.uid;

The dependencies in pubspec.yaml:

    sdk: flutter
  cloud_firestore: any
  firebase_auth: 0.14.0+5

My dependencies at the project level .gradle:

dependencies {
        classpath ''
        classpath ''

At the level of the application .gradle

defaultConfig {
        applicationId "com.example.testtool"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner  ""
        multiDexEnabled true

and dependencies (also at the .gradle application level):

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation ''
    androidTestImplementation ''
    implementation ''
    implementation 'androidx.multidex:multidex:2.0.1'

apply plugin: '' 

And that is the mistake:

I/flutter (25442): Another exception was thrown: NoSuchMethodError: The getter 'position' was called on null.
I/chatty  (25442): uid=10234(com.example.testtool) 2.ui identical 8 lines
I/flutter (25442): Another exception was thrown: NoSuchMethodError: The getter 'position' was called on null.
W/BiChannelGoogleApi(25442): (FirebaseAuth: ) getGoogleApiForMethod() returned Gms:
E/JavaBinder(25442): *** Uncaught remote exception!  (Exceptions are not yet supported across processes.)
E/JavaBinder(25442): java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArrayMap;
E/JavaBinder(25442):    at Source:22)
E/JavaBinder(25442):    at Source:17)
E/JavaBinder(25442):    at Source:8)
E/JavaBinder(25442):    at Source:1)
E/JavaBinder(25442):    at Source:47)
E/JavaBinder(25442):    at Source:9)
E/JavaBinder(25442):    at Source:9)
E/JavaBinder(25442):    at Source:13)
E/JavaBinder(25442):    at android.os.Binder.execTransact(
E/JavaBinder(25442): Caused by: java.lang.ClassNotFoundException: Didn't find class "" on path: DexPathList((zip file "/data/app/com.example.testtool-H8ql3WqJ13OCb4aCfdLNsQ==/base.apk"),nativeLibraryDirectories=(/data/app/com.example.testtool-H8ql3WqJ13OCb4aCfdLNsQ==/lib/arm64, /data/app/com.example.testtool-H8ql3WqJ13OCb4aCfdLNsQ==/base.apk!/lib/arm64-v8a, /system/lib64))
E/JavaBinder(25442):    at dalvik.system.BaseDexClassLoader.findClass(
E/JavaBinder(25442):    at java.lang.ClassLoader.loadClass(
E/JavaBinder(25442):    at java.lang.ClassLoader.loadClass(
E/JavaBinder(25442):    ... 16 more
E/AndroidRuntime(25442): FATAL EXCEPTION: Binder:25442_2
E/AndroidRuntime(25442):    at Source:57)
E/AndroidRuntime(25442):    at Source:10)
E/AndroidRuntime(25442):    at Source:62)
E/AndroidRuntime(25442):    at$zzb.zza(Unknown Source:5)
E/AndroidRuntime(25442):    at Source:15)
E/AndroidRuntime(25442):    at Source:35)
E/AndroidRuntime(25442):    at Source:41)
E/AndroidRuntime(25442):    at Source:9)
E/AndroidRuntime(25442):    at Source:9)
E/AndroidRuntime(25442):    at Source:13)
E/AndroidRuntime(25442):    at android.os.Binder.execTransact(
E/AndroidRuntime(25442): Caused by: java.lang.ClassNotFoundException: Didn't find class "" on path: DexPathList((zip file "/data/app/com.example.testtool-H8ql3WqJ13OCb4aCfdLNsQ==/base.apk"),nativeLibraryDirectories=(/data/app/com.example.testtool-H8ql3WqJ13OCb4aCfdLNsQ==/lib/arm64, /data/app/com.example.testtool-H8ql3WqJ13OCb4aCfdLNsQ==/base.apk!/lib/arm64-v8a, /system/lib64))
E/AndroidRuntime(25442):    at dalvik.system.BaseDexClassLoader.findClass(
E/AndroidRuntime(25442):    at java.lang.ClassLoader.loadClass(
E/AndroidRuntime(25442):    at java.lang.ClassLoader.loadClass(
E/AndroidRuntime(25442):    ... 16 more
I/Process (25442): Sending signal. PID: 25442 SIG: 9
Lost connection to device.

google apps script – I can not find how to return data from the child in firebase

The following data is inserted into Firebase via the real-time database that I deploy from Android Studio with Java:

FirebaseDatabase dBa = FirebaseDatabase.getInstance();
DatabaseReference myRef = dBa.getReference("DataLegalizaciones/");
String keyId = myRef.push().getKey();

and the data looks like this in my comic:

enter the description of the image here

– extraName is the name of the logged-on user.

– keyId is the only key that generates a real-time database in this case LnOkyI_ICkYGjd5e5Xk

– infor is the HashMap I created to store nested data in LnOkyI_ICkYGjd5e5Xk

enter the description of the image here

I retrieve this data through Google Apps Scripts so that each of the fields containing each key of a spreadsheet is in the right place in the information …

It works if I manually add to my script the collection "Andres Mora" in this part of my script:

function getDataFromRealtime() {

var firebaseUrl = " Mora/";
  var base = FirebaseApp.getDatabaseByUrl(firebaseUrl);
  var data = base.getData();
  for(var i in data) {
    //Logger.log(data(i).firstName + ' ' + data(i).lastName);
    var sheet = SpreadsheetApp.getActiveSheet();
    sheet.appendRow((data(i).nombreUsuario, data(i).ccnit,data(i).conceptoGasto,

and I can see this information in my Google listing:

enter the description of the image here

My problem occurs when I try to recover the information contained in this line. var firebaseUrl = " Mora/"; of all registered users and not just Andres Mora and that the data is not repeated …

Web application (works with Firestore cloud firebase as a database) and pricing cloud functions

The Firestore and Cloud cloud features have a different price plan.

my web application retrieves the records from the cloud store. but let's say, I'm writing a cloud function that retrieves records. what pricing would apply whether it's the cloud functions or the cloud storage service, or both.

How to View E-Commerce Data in Firebase Analytics

I am currently setting up Firebase Analytics for my apps on iOS and Android. I already have an "old" Google Analytics property that allows me to see all the basic elements supported by Firebase one way or another.

But I also use the old GA for detailed e-commerce information about sales, including product performance. Unless something fundamental about Firebase I miss completely, there does not seem to be any similar functionality ready for use?

It seems that I can only see aggregate revenues for all sales and not revenue at the product level. I guess I could do this by setting up events for individual product purchases, but what if I have more products than the maximum number of events allowed in Firebase?

So my question is: how can I configure Firebase so that it shows me all the basic "conversions", such as GA's revenue, quantity, and unique purchases?

Ionic Framework – Is there a way to only use cloud messaging without using other Firebase services?

I'm trying to create an Ionic / angular push notification system and I want to use Firebase for that. I have everything works but I have this error

Error: quota exceeded (Quota exceeded for quota group ...
to increase quotas, enable billing in your project

I really do not want to spend money for this project and I saw the project of a colleague without backup memory service or cloud, and has notifications working perfectly.

then is it possible to use only cloud messaging without using other Firebase services?