Orange
Orange

Reputation: 547

Firebase named instance for Android/JNI application

I want to create a standalone instance of Firebase for my JNI-library purposes. E.g. the library should report its own analytics and receive remote configs. And all of that should be done separately from an app, which can have another Firebase object.

I've found the next method in Firebase library for C++:

static ::firebase::App* ::firebase::App:Create(const ::firebase::AppOptions& options, const char* name, JNIEnv* jni_env, jobject activity);

It allows creating 'named' instance of Firebase app. However, I couldn't find the proper methods for creating ::firebase::Analytics and ::firebase::RemoteConfig that will consume my 'named' Firebase app.

So, I have two questions about that:

  1. Is it possible (maybe someone knows any workarounds) to create my instances of analytics and remote config within JNI code?
  2. And the question to Firebase team. Do you plan to implement the mentioned functionality for analytics/remote config? I see that you've allowed the same option for ::firebase::database::Database class and I'm able to instantiate database separately from a main app.

Thanks in advance!

Upvotes: 0

Views: 242

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317828

This is not possible. Analytics, and Firebase products derived from Analytics data (such as Remote Config) only work at the application level. They can't be bundled into a library for use across apps. The products depend heavily on the behavior of the app as a whole, so they can only be configured to work with a single app at a time. This is true for all client libraries, not just C++. There are no plans to change this behavior.

Upvotes: 0

Related Questions