Skip to content

Commit 91335e0

Browse files
committed
FirebaseAndroid: introduce SwiftFirebase JAR
This introduces the Java bindings for the JNI backed implementation. When implementing an Android application which uses swift-firebase, `SwiftFirebase` provides the bridge to the JNI functions required to enable the functionality.
1 parent cb0f182 commit 91335e0

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Sources/FirebaseAndroid/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ target_include_directories(FirebaseAndroidJNI PUBLIC
77
target_link_libraries(FirebaseAndroidJNI PRIVATE
88
log)
99

10+
add_jar(SwiftFirebase
11+
Native.java
12+
INCLUDE_JARS
13+
$ENV{ANDROID_SDK_ROOT}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/android.jar)

Sources/FirebaseAndroid/Native.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: BSD-3-Clause
2+
3+
package company.thebrowser;
4+
5+
import android.app.Activity;
6+
7+
public class Native
8+
{
9+
public native boolean RegisterActivity(android.app.Activity activity);
10+
}

0 commit comments

Comments
 (0)