This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": { | |
".read": "true", | |
".write": "true" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by dharma kshetri(@[email protected]) on 12/14/16. | |
*/ | |
public class MainActivity extends AppCompatActivity { | |
public static final String TAG="FIREBASE"; | |
public RecyclerView recyclerListView; | |
public UserAdapter myAdapter; | |
public EditText editTextName; | |
public EditText editTextCountry; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
</manifest> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
compile 'com.google.code.gson:gson:2.6.2' | |
compile 'com.squareup.retrofit2:retrofit:2.1.0' | |
compile 'com.squareup.retrofit2:converter-gson:2.1.0' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Converter Library | |
Gson com.squareup.retrofit2:converter-gson:2.1.0 | |
Jackson com.squareup.retrofit2:converter-jackson:2.1.0 | |
Moshi com.squareup.retrofit2:converter-moshi:2.1.0 | |
Protobuf com.squareup.retrofit2:converter-protobuf:2.1.0 | |
Wire com.squareup.retrofit2:converter-wire:2.1.0 | |
Simple XML com.squareup.retrofit2:converter-simplexml:2.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package co.apidemos.rest; | |
import retrofit2.Retrofit; | |
import retrofit2.converter.gson.GsonConverterFactory; | |
/** | |
* Created by dharma kshetri on 12/27/16. | |
*/ | |
public class APIClient { | |
public static final String STACKOVERFLOW_BASE_URL="https://api.stackexchange.com" ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package co.apidemos.rest; | |
import co.apidemos.model.StackOverFlowData; | |
import retrofit2.Call; | |
import retrofit2.http.GET; | |
import retrofit2.http.Query; | |
/** | |
* Created by dharma kshetri on 12/27/16. | |
*/ | |
public interface UserEndPoints { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package co.apidemos.model; | |
import com.google.gson.annotations.SerializedName; | |
import java.util.HashMap; | |
/** | |
* Created by dharma kshetri on 12/27/16. | |
*/ | |
public class StackOverFlowUser { | |
@SerializedName("location") | |
private String location; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package co.apidemos.activity; | |
import android.os.Bundle; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.widget.TextView; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* package whatever; // don't place package name! */ | |
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
/* Name of the class has to be "Main" only if the class is public. */ | |
class Ideone | |
{ |