mirror of https://github.com/iSoron/uhabits.git
parent
4808941539
commit
1555347e76
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "1070387411684",
|
||||||
|
"firebase_url": "https://uhabits-60f5c.firebaseio.com",
|
||||||
|
"project_id": "uhabits-60f5c",
|
||||||
|
"storage_bucket": "uhabits-60f5c.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:1070387411684:android:c24ac74afee79412",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "org.isoron.uhabits"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "1070387411684-62dgqp208udgiql8k3nk9nnsj99tps2n.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "org.isoron.uhabits",
|
||||||
|
"certificate_hash": "f7ade3b34bad8aadad38b28645d32ff5674a96a5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "1070387411684-sinls84quiqltb6t9mlok2cg1qaqu4hk.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "1070387411684-sinls84quiqltb6t9mlok2cg1qaqu4hk.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyA_FuA7_lt1HQ6yG39YDHykKa5B9Bngs6s"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"analytics_service": {
|
||||||
|
"status": 1
|
||||||
|
},
|
||||||
|
"appinvite_service": {
|
||||||
|
"status": 2,
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "1070387411684-sinls84quiqltb6t9mlok2cg1qaqu4hk.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ads_service": {
|
||||||
|
"status": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package org.isoron.uhabits.activities.login;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.firebase.ui.auth.AuthUI;
|
||||||
|
|
||||||
|
import org.isoron.uhabits.R;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private static final int RC_SIGN_IN = 123;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_login);
|
||||||
|
|
||||||
|
signin();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void signin() {
|
||||||
|
// ...
|
||||||
|
|
||||||
|
// Choose authentication providers
|
||||||
|
List<AuthUI.IdpConfig> providers = Arrays.asList(
|
||||||
|
new AuthUI.IdpConfig.EmailBuilder().build(),
|
||||||
|
new AuthUI.IdpConfig.PhoneBuilder().build(),
|
||||||
|
new AuthUI.IdpConfig.GoogleBuilder().build(),
|
||||||
|
new AuthUI.IdpConfig.FacebookBuilder().build(),
|
||||||
|
new AuthUI.IdpConfig.TwitterBuilder().build());
|
||||||
|
|
||||||
|
// Create and launch sign-in intent
|
||||||
|
startActivityForResult(
|
||||||
|
AuthUI.getInstance()
|
||||||
|
.createSignInIntentBuilder()
|
||||||
|
.setAvailableProviders(providers)
|
||||||
|
.build(),
|
||||||
|
RC_SIGN_IN);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activities.login.LoginActivity">
|
||||||
|
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
Loading…
Reference in new issue