Skip to content

Commit

Permalink
FirebaseAndroid: introduce SwiftFirebase JAR
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd committed Apr 2, 2024
1 parent 2d64b87 commit b836c3d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/FirebaseAndroid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ target_include_directories(FirebaseAndroidJNI PUBLIC
target_link_libraries(FirebaseAndroidJNI PRIVATE
log)

add_jar(SwiftFirebase
Native.java
INCLUDE_JARS
$ENV{ANDROID_SDK_ROOT}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/android.jar)
10 changes: 10 additions & 0 deletions Sources/FirebaseAndroid/Native.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: BSD-3-Clause

package company.thebrowser;

import android.app.Activity;

public class Native
{
public native boolean RegisterActivity(android.app.Activity activity);
}

0 comments on commit b836c3d

Please sign in to comment.