diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2018-04-25 13:34:54 +0200 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2018-04-25 13:34:54 +0200 |
commit | 4de306375a33b2abd067e65658a46d45cba5e56e (patch) | |
tree | 00a734df4dcd1d94d0916eee6a6cc1cd98aafa7d /app/src/main/java/org/marcinzelent/liberavem/NewObservationActivity.java | |
parent | 3812f6ccf9d5796f25f81aeea942c25b58296d01 (diff) |
Added Firebase authentication
Diffstat (limited to 'app/src/main/java/org/marcinzelent/liberavem/NewObservationActivity.java')
-rw-r--r-- | app/src/main/java/org/marcinzelent/liberavem/NewObservationActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/org/marcinzelent/liberavem/NewObservationActivity.java b/app/src/main/java/org/marcinzelent/liberavem/NewObservationActivity.java index e69eaba..f6488e4 100644 --- a/app/src/main/java/org/marcinzelent/liberavem/NewObservationActivity.java +++ b/app/src/main/java/org/marcinzelent/liberavem/NewObservationActivity.java @@ -28,6 +28,7 @@ import com.android.volley.VolleyLog; import com.android.volley.toolbox.HttpHeaderParser; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; +import com.google.firebase.auth.FirebaseAuth; import org.json.JSONException; import org.json.JSONObject; @@ -128,7 +129,7 @@ public class NewObservationActivity extends AppCompatActivity { jsonBody.put("Longitude", ((EditText)findViewById(R.id.new_longitude)).getText()); jsonBody.put("Placename", ((EditText)findViewById(R.id.new_place)).getText()); jsonBody.put("Population", ((EditText)findViewById(R.id.new_population)).getText()); - jsonBody.put("UserId", "Sminem"); + jsonBody.put("UserId", FirebaseAuth.getInstance().getCurrentUser().getUid()); jsonBody.put("NameDanish", selectedBird.getNameDanish()); jsonBody.put("NameEnglish", selectedBird.getNameEnglish()); final String requestBody = jsonBody.toString(); |