Based on https://firebase.google.com/docs/server/setup
i found this code to implement.
In my eclipse-project i referenced the jar
And the code does not raise a problem inside Eclipse... The methods are not marked "as bad"
BUT if i then want to compile the library with SLC i get the following error.
The file firebase-server-sdk-3.0.1.jar does exists inside the libs folder of the project and also it is available in the B4J Additional libs folder.
Why SLC (or java?) is not able to resolve the reference?
i found this code to implement.
B4X:
// Initialize the app with a service account, granting admin privileges
FirebaseOptions options = new FirebaseOptions.Builder()
.setDatabaseUrl("https://databaseName.firebaseio.com")
.setServiceAccount(new FileInputStream("path/to/serviceAccountCredentials.json"))
.build();
FirebaseApp.initializeApp(options);
// As an admin, the app has access to read and write all data, regardless of Security Rules
DatabaseReference ref = FirebaseDatabase
.getInstance()
.getReference("restricted_access/secret_document");
ref.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
Object document = dataSnapshot.getValue();
System.out.println(document);
}
});
In my eclipse-project i referenced the jar
And the code does not raise a problem inside Eclipse... The methods are not marked "as bad"
BUT if i then want to compile the library with SLC i get the following error.
The file firebase-server-sdk-3.0.1.jar does exists inside the libs folder of the project and also it is available in the B4J Additional libs folder.
Why SLC (or java?) is not able to resolve the reference?