Firebase Database with Server SDK
<p>I am trying to send data to my firebase database with the Firebase Server SDK (JAVA). I created a service account and initialized firebase like in documentation. <a href="https://firebase.google.com/docs/database/server/start" rel="nofollow">https://firebase.google.com/docs/database/server/start</a> </p>

<p>When I start my code, nothing happen. The first time I had a security question from Windows, to accept internet connection. I accepted it. But I have no new data in my firebase database. </p>

<p>I made also a simple app for android with the sdk for android and that works. </p>

<p>Maybe somebody can help me and have some ideas? </p>

<pre><code>FirebaseOptions options = new FirebaseOptions.Builder()
                .setServiceAccount(new FileInputStream("xxxxxxxxxx.json"))
                .setDatabaseUrl("https://xxxxxxxxxx.firebaseio.com/")
                .build();
        FirebaseApp.initializeApp(options);

        FirebaseDatabase database = FirebaseDatabase.getInstance();
        DatabaseReference myRef = database.getReference("message");
        myRef.setValue("www");
</code></pre>