Giter VIP home page Giter VIP logo

login-basics's Introduction

Login Basics

Login Basics is an implementation of an Android app that support Login with Facebook, Google Plus (G+) and your own login logic. The aim of this project is to serve as basis to build apps that require login as a feature.

Screenshots

Steps

In order to make the project ready for your app you need to:

Facebook

Google

  • Go to the Google Developers Console at https://console.developers.google.com/ and create a new project (or get to one you already have);
  • In the left sidebar, select APIs & auth (the APIs sub-item is automatically selected) find the Google+ API and set its status to ON;
  • Get a configuration file at Google Developers by:
    a) Select the correct project and package then click on Continue;
    b) Click the button on the bottom to Generate configuration files
    c) Download the google-services.json for your app and put it at the app/ or mobile/ module directory in your Android project. (The file contains configuration details, such as keys and identifiers, for the services you just enabled)

Own Logic

  • Replace the code at doInBackground on UserLoginTask at the LoginActivity to your own logic;
  • Be happy :)

Me

André Batista da Silva

License

Copyright (C) 2015 andrebtsa
Copyright (C) 2013 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

login-basics's People

Contributors

andrebts avatar dedenhabibi avatar rahatshahzeb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

login-basics's Issues

G+ login error

I am trying to integrate my android app with Gmail login using your project. After pressing 'Sign in With Google' Bitton, I get error message as ' Error on Login, Check your google + Login method' .

Please advise on how to fix this.

no loguea

Hola amigo,
mira el error que reporte es porque nunca entra al metodo
facebookLoginButton.registerCallback(callbackManager, new FacebookCallback() {
....
..
}

no arroja un error como tal, simplemente si debugeo el código nunca entra a ese metodo
así mismo con google no puedo loguearme tampoco, me pide mis cuenta y todo pero no pasa de ahí

siempre arroja el toast con el siguiente mensaje: "Person information is null"

File google-services.json is missing

Error:Execution failed for task ':app:processDebugGoogleServices'.

File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.

Have you try the new version of Facebook sdk?

Have you try the new version of Facebook sdk?
When I use the 'com.facebook.android:facebook-android-sdk:4.1.0+'
I always got the error when I sync gradle:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

    com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'H:\Android\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

I have try the 4.0.0: it work.
I have try to remove the play-service: it work
but the 4.1+ version facebook with play service always got this error.

FATAL EXCEPTION: AsyncTask #1

According to the steps to integrate Facebook login but the mistakes:

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: com.example.licar2.myapplication, PID: 2168 java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:911) at com.facebook.internal.Utility.queryAppSettings(Utility.java:846) at com.facebook.login.widget.LoginButton$1.run(LoginButton.java:491) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)

Can you help me?

Gmail y Facebook login no funciona

Buenas noches,
Estuve tratando de correr la app pero no lo conseguí, agregue el Json faltante las Keys entre todo lo demás y hasta consigo los permisos pero no me da una respuesta satisfactoria la app para el login con Facebook ni con Gmail, sabrán de alguna falla?

Undefined dimen

<dimen name="nav_header_vertical_spacing">16dp</dimen>

You forgot to define this in res/values/dimens.xml
and for devices with API < 21 its have after login

Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1
            at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:463)
            at android.view.View.<init>(View.java:3345)
            at android.widget.TextView.<init>(TextView.java:447)
            at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:48)
            at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:44)
            at android.support.v7.internal.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
            at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:912)
            at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:966)
            at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.support.design.internal.NavigationMenuPresenter.inflateHeaderView(NavigationMenuPresenter.java:207)
            at android.support.design.widget.NavigationView.inflateHeaderView(NavigationView.java:246)
            at android.support.design.widget.NavigationView.<init>(NavigationView.java:168)
            at android.support.design.widget.NavigationView.<init>(NavigationView.java:92)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
            at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
            at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:255)
            at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
            at bscorp.appbase.MainActivity.onCreate(MainActivity.java:22)

Why not as Library?

If I want to use the code I have to copy all files.
Isn't it easier to create a library and publish it on jcenter?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.