#save etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
#save etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

8 Ağustos 2017 Salı

ANDROID - FIREBASE UPDATE OPERATION

I want to update my record in my firebase database table. I will update order cost as 10 which has primary key as: "20170807192734".




Here is the query I should write to update:



final FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();
DatabaseReference dbRef = firebaseDatabase.getReference("orders");
String primaryKey = "20170807192734";
dbRef.child(primaryKey).child("cost").setValue("10");


Firebase veritabanimdaki orders tablosundaki "20170807192734" primary key e sahip olan kayitin costunu 10 olarak guncellemek istersem yazmam gereken kodlar yukaridaki gibi olmalidir.

8 Temmuz 2017 Cumartesi

ANDROID - SharedPreferences Kullanımı - Using SharedPreferences


Shared Preferences kullanarak uygulama kapansa bile kullanicinin bilgilerini koruyabiliriz. Bu sekilde tekrardan uygulamayi actiginda tekrardan login olmasina gerek olmaz. Bunun icin basit bir uygulama yaptim. Kodlar burada yer almakta. Ekran goruntuleri ise asagidadir.


By using SharedPreferences, even application closes,we can save the user's information. By this way when user again opens the application, there will be no need for user to login again. My code is in here. Screenshots of application is available in below.