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;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_pantallaprincipal);

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

    uplstorage = (FloatingActionButton) findViewById(R.id.efe);
    mButton = (Button) findViewById(R.id.Cerrarsei);
    nombre = (TextView) findViewById(R.id.Name);
    jeje = (ImageView) findViewById(R.id.mtb);

// 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);
    roundedBitmapDrawable.setCircular(true);
    jeje.setImageDrawable(roundedBitmapDrawable);

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

    uplstorage.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent intent = new Intent(Intent.ACTION_PICK);
            intent.setType("image/*");
            startActivityForResult(intent,Gallery_Intent);
        }
    });

// this is to disconnect

    mButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            mAuth.signOut();
            startActivity(new Intent(Pantallaprincipal.this, Inicio.class));
            finish();
        }
    });

    getUserInfo();
}

// Here you can download the photo on Storage

@Override
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() {
            @Override
            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() {
        @Override
        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
            if (dataSnapshot.exists()) {
                String name = dataSnapshot.child("nombre").getValue().toString();

                nombre.setText(name);
            }

        }

        @Override
        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:

=> https://i.ytimg.com/vi/CZ575BuLBo4/maxresdefault.jpg

I tried this and it does not work:

=> https://firebase.googleblog.com/2018/05/web-notifications-api-support-now.html

here is my notification charge:

array
(
    "title" =>  "FCM Message",
    "body" => "This is an FCM Message",
    "click_action" => "http://example.com/",
    "icon" => "/logo.jpg",
    "actions" => array(
        0 => array(
            'title' => 'Like',
            'click_action' => 'http://example.com/?aaa=1',
            'icon' => 'icons/heart.png',
        ),
        1 => array(
            'title' => 'Unsubscribe',
            'click_action' => 'http://example.com/?aaa=2',
            '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;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        mAuth = FirebaseAuth.getInstance();
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mAuthlistner = new FirebaseAuth.AuthStateListener() {
            @Override
            public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
                updateUI(mAuth.getCurrentUser());
            }
        };
    }
    public void onStart(){
        super.onStart();
        mAuth.addAuthStateListener(mAuthListener);
    }
    public void open_login(){
        Intent open_login_activity = new Intent(MainActivity.this, LoginActivity.class);
        startActivity(open_login_activity);
    }
    public void open_postlogin(){
        Intent open_postlogin_activity = new Intent(MainActivity.this, Main_postlogin.class);
        startActivity(open_postlogin_activity);
    }

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

}

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.
    print(userInfo)

    // Change this to your preferred presentation option
    completionHandler((.alert))
  }

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."

NSAppTransportSecurity
    
        NSAllowsArbitraryLoads
        
        NSExceptionDomains
        
            localhost
            
                NSExceptionAllowsInsecureHTTPLoads
                
            
        
    

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: "**********.firebaseapp.com",
  databaseURL: "https://*********.firebaseio.com",
  projectId: "*********",
  storageBucket: "**********.appspot.com",
  messagingSenderId: "213******74",
  appId: "1:213******74:web:a******495f2"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig)
firebase.firestore().settings(settings);

export default firebase;

and my index.js file:

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

firebase.auth().signInAnonymously().catch(function (error) {
    console.log(error.code);
    console.log(error.message);
});

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:

dependencies:
  flutter:
    sdk: flutter
  cloud_firestore: any
  firebase_auth: 0.14.0+5

My dependencies at the project level .gradle:

dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'
    }

At the level of the application .gradle

defaultConfig {
        applicationId "com.example.testtool"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner  "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

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

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.firebase:firebase-analytics:17.0.1'
    implementation 'androidx.multidex:multidex:2.0.1'

}
apply plugin: 'com.google.gms.google-services' 

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: com.google.firebase.auth.api.internal.zzak@98a1ffc
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 com.google.firebase.auth.internal.zzam.zzc(Unknown Source:22)
E/JavaBinder(25442):    at com.google.firebase.auth.internal.zzam.zzde(Unknown Source:17)
E/JavaBinder(25442):    at com.google.firebase.auth.internal.zzam.zzdd(Unknown Source:8)
E/JavaBinder(25442):    at com.google.firebase.auth.internal.zzan.zzdf(Unknown Source:1)
E/JavaBinder(25442):    at com.google.firebase.auth.internal.zzm.isAnonymous(Unknown Source:47)
E/JavaBinder(25442):    at com.google.firebase.auth.api.internal.zzep.zza(Unknown Source:9)
E/JavaBinder(25442):    at com.google.firebase.auth.api.internal.zzdx.dispatchTransaction(Unknown Source:9)
E/JavaBinder(25442):    at com.google.android.gms.internal.firebase_auth.zza.onTransact(Unknown Source:13)
E/JavaBinder(25442):    at android.os.Binder.execTransact(Binder.java:731)
E/JavaBinder(25442): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.ArrayMap" 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(BaseDexClassLoader.java:134)
E/JavaBinder(25442):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/JavaBinder(25442):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/JavaBinder(25442):    ... 16 more
E/AndroidRuntime(25442): FATAL EXCEPTION: Binder:25442_2
E/AndroidRuntime(25442):    at com.google.firebase.auth.internal.zzat.zzi(Unknown Source:57)
E/AndroidRuntime(25442):    at com.google.firebase.auth.internal.zzat.zzg(Unknown Source:10)
E/AndroidRuntime(25442):    at com.google.firebase.auth.FirebaseAuth.zza(Unknown Source:62)
E/AndroidRuntime(25442):    at com.google.firebase.auth.FirebaseAuth$zzb.zza(Unknown Source:5)
E/AndroidRuntime(25442):    at com.google.firebase.auth.api.internal.zzcr.zzdx(Unknown Source:15)
E/AndroidRuntime(25442):    at com.google.firebase.auth.api.internal.zzen.zzen(Unknown Source:35)
E/AndroidRuntime(25442):    at com.google.firebase.auth.api.internal.zzen.zza(Unknown Source:41)
E/AndroidRuntime(25442):    at com.google.firebase.auth.api.internal.zzep.zza(Unknown Source:9)
E/AndroidRuntime(25442):    at com.google.firebase.auth.api.internal.zzdx.dispatchTransaction(Unknown Source:9)
E/AndroidRuntime(25442):    at com.google.android.gms.internal.firebase_auth.zza.onTransact(Unknown Source:13)
E/AndroidRuntime(25442):    at android.os.Binder.execTransact(Binder.java:731)
E/AndroidRuntime(25442): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.ArrayMap" 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(BaseDexClassLoader.java:134)
E/AndroidRuntime(25442):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(25442):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
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();
myRef.child(extraName).child(keyId).updateChildren(infor);

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 = "https://my-roodent.firebaseio.com/DataLegalizaciones/Andres 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,
                     data(i).descripcionGasto,data(i).fechaGasto,data(i).impuestoGasto,
                     data(i).ivaGasto,data(i).lugarGasto,
                     data(i).proveedorGasto,data(i).razonSocial,
                     data(i).retencionGasto,data(i).subtotalGasto,
                     data(i).totalGasto,data(i).urlImagenGasto));
  }
}

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 = "https://my-roodent.firebaseio.com/DataLegalizaciones/Andres 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?