SendFox + Firebase Realtime Database Integrations

Appy Pie Connect allows you to automate multiple workflows between SendFox and Firebase Realtime Database

About SendFox

SendFox is an email marketing tool built for content creators.

About Firebase Realtime Database

Realtime Database Stores and sync app data in milliseconds

Firebase Realtime Database Integrations
Firebase Realtime Database Alternatives

Connect the apps you use everyday and find your productivity super-powers.

  • Caspio Cloud Database Caspio Cloud Database
  • RethinkDB RethinkDB
Connect SendFox + Firebase Realtime Database in easier way

It's easy to connect SendFox + Firebase Realtime Database without coding knowledge. Start creating your own business flow.

  • New Campaign

    Lists the campaigns.

  • New Contact

    Lists the contacts.

  • New List

    Lists the lists.

  • New Unsubscribe

    Triggered when a contact is unsubscribed.

  • Edit or Updated Child Object in Firebase Realtime Database

    Triggers on updation of a child object in firebase realtime database.

  • New Child Object in a Firebase Realtime Database

    New Child Object in a Firebase Realtime Database

  • Create List

    Creates a new list.

  • Unsubscribe Contact

    Unsubscribes a contact.

  • Create or Replace Firebase Realtime Database Record

    Creates or replaces a child object within your Firebase Realtime Database.

How SendFox & Firebase Realtime Database Integrations Work

  1. Step 1: Choose SendFox as a trigger app and Select "Trigger" from the Triggers List.

    (30 seconds)

  2. Step 2: Authenticate SendFox with Appy Pie Connect.

    (10 seconds)

  3. Step 3: Select Firebase Realtime Database as an action app.

    (30 seconds)

  4. Step 4: Pick desired action for the selected trigger.

    (10 seconds)

  5. Step 5: Authenticate Firebase Realtime Database with Appy Pie Connect.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of SendFox and Firebase Realtime Database


SendFox is a new kind of push notification service that uses Firebase Realtime Database to deliver push notifications. It provides SDK for iOS, Android and the web platform.

Firebase Realtime Database?

Firebase Realtime Database is the world's easiest way to store, sync, and query data in realtime from client apps. With a simple API and powerful features, you can store and sync data between clients in realtime, instantly react to changes with Firebase Notifications, and query the database with our query language.

Integration of SendFox and Firebase Realtime Database

I want to integrate SendFox with Firebase Realtime Database, so that I can use the database to save the user's phone number and send a push notification to him when he receives a message from a friend.

In order to trace what happens when the application is running on the mobile, I will use logcat. First of all, I have to add the fplowing lines of code into my AndroidManifest.xml file.

<application android:name="com.firebase.client.MyApp" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".NewMessageActivity" /> </application>

Then I have to include this logcat statement into my source code.

import com.firebase.client.Firebase; import com.firebase.client.FirebaseOptions; import com.firebase.client.FirebaseDatabase; import com.firebase.client.auth.AuthCredentials; import com.firebase.client.auth.AuthStateListener; import com.firebase.client.database.RealtimeDatabase; import com.firebase.client.database.Query; import androidx.lifecycle.ViewModel; public class MainActivity extends AppCompatActivity { private Firebase firebase; private RealtimeDatabase rdb; private ViewModel viewModel = ViewModelProviders .of(this.get(MainActivity .class); @Override protected void onCreate(Bundle savedInstanceState. { super .onCreate(savedInstanceState); setContentView(R .layout .activity_main); firebase = Firebase .getInstance(); if (viewModel != null . { rdb = rdb = firebase .getReference(); } } @Override protected void onStart(. { super .onStart(); AuthStateListener authStateListener = new AuthStateListener (. { @Override public void onAuthStateChanged ( int state. { super .onAuthStateChanged(state); switch (state. { case Firebase .AuthState .STATE_AUTHENTICATED . break ; case Firebase .AuthState .STATE_UNAUTHENTICATED . break ; default . super .onAuthStateChanged(state); } } }; firebase .addAuthStateListener(authStateListener); } @Override protected void onStop(. { super .onStop(); firebase .removeAuthStateListener(authStateListener); } }

After that, I have to change the layout of my app as fplows:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tops= "http://schemas.android.com/tops" android:layout_width= "match_parent" android:layout_height= "match_parent" android:orientation= "vertical" > <androidx.constraintlayout .widget .ConstraintLayout android:layout_width= "match_parent" android:layout_height= "match_parent" app:layout_constraintBottom_toBottomOf= "parent" app:layout_constraintLeft_toLeftOf= "parent" app:layout_constraintRight_toRightOf= "parent" app:layout_constraintTop_toTopOf= "parent" > <TextView android:id= "@+id/textView1" android:layout_width= "wrap_content" android:layout_height= "wrap_content" android:layout_marginStart= "20dp" android:textSize= "16sp" /> <Button android:id= "@+id/button1" android:layout_width= "wrap_content" android:layout_height= "wrap_content" android:gravity= "center_horizontal|right" android:text= "Send Message!" /> </androidx.constraintlayout .widget .ConstraintLayout> </LinearLayout>

And then, I will create a new class called NewMessageActivity to display the messages from friends as fplows:

package com .example .firebaserealtimedbdemo ; import androidx .appcompat .app .ActivityCompat ; import androidx .recyclerview .widget .RecyclerView ; import com .sendfox .sdk .SendFxPushNotificationMessage ; import com .sendfox .sdk .SfPushNotificationBuilder ; import com .sendfox .sdk .SfPushNotificationType ; public class NewMessageActivity extends ActivityCompat implements RecyclerView . OnItemClickListener , SfPushNotificationType , SfPushNotificationBuilder { private static final String TAG = NewMessageActivity . class . getSimpleName(); private RecyclerView mRecyclerView; private ViewModel viewModel; @Override protected void onCreate ( @Nullable Bundle savedInstanceState . { super .onCreate(savedInstanceState); setContentView(R .layout .activity_newmessage); viewModel = ViewModelProviders .of( this .get( NewMessageActivity . class ); mRecyclerView = findViewById( R .id . recyclerView1 ); mRecyclerView .setOnItemClickListener( this ); } public void showMessage ( SendFxPushNotificationMessage msg . { mRecyclerView .setAdapter( new DisplayMessageAdapter ()); mRecyclerView .notifyDataSetChanged(); viewModel .setMessage(msg); viewModel .saveChanges(); } @Override public void onItemClick ( @NonNull RecyclerView recyclerView , int position , View v , int action . { SendFxPushNotificationBuilder builder = new SendFxPushNotificationBuilder (); if (position == 0 ){ builder .setMessageType( SfPushNotificationType . TEXT ); } else if (position == 1 ){ builder .setMessageType( SfPushNotificationType . IMAGE ); } else if (position == 2 ){ builder .setMessageType( SfPushNotificationType . VIDEO ); } // Set MessageBuilder Type builder .setSenderId(( int . viewModel .getSenderId()); // Set message body builder .setMessageBody(( String . viewModel .getMessageBody()); // Set title builder .setTitle(( String . viewModel .getTitle()); // Set message action builder .setActionMsg(( String . viewModel .getActionMsg()); // Set buttons builder .setButtons(( int . viewModel .getButtons()); builder .setIcon(( int . viewModel .getIcon()); builder .build(); SendFxPushNotification message = builder .create(); firebaseRealtimeDBHelper(viewModel, MainActivityKt .insert(message); } private void firebaseRealtimeDBHelper ( ViewModel viewModel , MainActivityKt activity . { String authToken = viewModel !== null ? (( MainActivityKt . activity. !== null ? (( MainActivityKt . activity. !== null ? (( MainActivityKt . activity. !==

The process to integrate SendFox and Firebase Realtime Database may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.