One-stop-shop for Social Network integrations

Overview

Roguin

License Bintray Android Arsenal

One stop shop for Social Network integrations

Use the same code for Google, Facebook and Twitter

What is Roguin

Social Network integrations can be a pain to write and maintain. This goes double if you want to add more than one Network into a single project. With Roguin, the whole process is simplified and Google, Facebook and Twitter are unified and handled with the same code.

You can add a 'Sing In With' feature for all three networks with the same exact code!

Preparation

Roguin helps with code but you still need valid Applications as per Social Network regulations and guidelines. So, you would still need to:

Installation

1. Dependency

implementation 'com.izikode.izilib:roguin:0.3'

2. Social Network Application keys

You must add your valid App key and secrets in Manifest placeholders, for both Facebook and Twitter. Google does not require this. So in your app's build.gradle file, add the following:

android {
    defaultConfig {
        manifestPlaceholders = [
                facebook_api_key   : 'my valid facebook app key',
                twitter_api_key    : 'my valid twitter app key',
                twitter_api_secret : 'my valid twitter app secret'
        ]
    }
}

3. Extend RoguinActivity

Every social network SDK uses the startActivityForResult in one way or another. In the spirit of making stuff as easy as possible, Roguin provides a Base Activity class, RoguinActivity which handles registering, unregistering, request codes and the lot. Just extend in your Activities and you are done.

4. Endpoint initialization

Prior to using, the Endpoints you need must be initialized. A good place to do this is in the onCreate of your app's Application class. And you can do so like this:

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()

        GoogleEndpoint.initialize(this)
        FacebookEndpoint.initialize(this)
        TwitterEndpoint.initialize(this)
    }
}

Usage

All three wrappers, GoogleEndpoint, FacebookEndpoint and TwitterEndpoint, implement the RoguinEndpoint interface. So they all expose the following:

  • val isSignedIn for checking the Sign In status for your app.
  • fun requestSignIn for starting a new Sing In flow in your app.
  • fun requestSignOut for starting a new Sign Out flow in your app.
  • fun requestProfile for getting Basic Profile information of the logged in user.

The following code is an outtake from the demo project in this repository and shows how simple signing in and out of all three networks is with Roguin.

googleButton.setOnClickListener {
    if (googleEndpoint.isSignedIn) {
        googleEndpoint.requestSignOut { success ->
            if (success) {
                googleStatus.text = "Google is DISCONNECTED"
            }
        }
    } else {
        googleEndpoint.requestSignIn { success, token, error ->
            if (success) {
                googleStatus.text = "Google is CONNECTED"
            }
        }
    }
}

facebookButton.setOnClickListener {
    if (facebookEndpoint.isSignedIn) {
        facebookEndpoint.requestSignOut { success ->
            if (success) {
                facebookStatus.text = "Facebook is DISCONNECTED"
            }
        }
    } else {
        facebookEndpoint.requestSignIn { success, token, error ->
              if (success) {
                facebookStatus.text = "Facebook is CONNECTED"
            }
        }
    }
}

twitterButton.setOnClickListener {
    if (twitterEndpoint.isSignedIn) {
        twitterEndpoint.requestSignOut { success ->
            if (success) {
                twitterStatus.text = "Twitter is DISCONNECTED"
            }
        }
    } else {
        twitterEndpoint.requestSignIn { success, token, error ->
            if (success) {
                twitterStatus.text = "Twitter is CONNECTED"
            }
        }
    }
}

For a full example, see the sample app.

Licence

Copyright 2018 Fanis Veizis

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.
You might also like...
A native android app that shows how much calories one must consume based on their profile
A native android app that shows how much calories one must consume based on their profile

Healtify is a native android app which allows the user to track the amout of Calories they are consuming. It not only tracks the calories but also shows how much of fat, protein and carbs they have consumed and how much they should be doing.

An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc.  & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.
An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc. & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.

An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc. & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.

An android app make a one-stop solution for finding the desired reading or research partner, sell their own products, and also be a tutor
An android app make a one-stop solution for finding the desired reading or research partner, sell their own products, and also be a tutor

The purpose of this project is to make a one-stop solution for finding the desired reading or research partner, sell their own products, and also be a tutor.

AppIntroAnimation is a set of code snippets to make cool intro screen for your app with special Image Translation and Transformation animation effects. It is very easy to use and customize without adding third party library integrations.
Jetpack Compose based project, used to stress-testing compose features / integrations and explore non-trivial functionality

Project containing Jetpack Compose samples For pagination & network images it uses CATAAS. Known issues Navigation-Compose Issue with fast tapping on

Unified API Library for: Cloud Storage, Social Log-In, Social Interaction, Payment, Email, SMS, POIs, Video & Messaging. Included services are Dropbox, Google Drive, OneDrive, OneDrive for Business, Box, Egnyte, PayPal, Stripe,  Google Places, Foursquare, Yelp, YouTube, Vimeo, Twitch, Facebook Messenger, Telegram, Line, Viber, Facebook, GitHub, Google+, LinkedIn, Slack, Twitter, Windows Live, Yahoo, Mailjet, Sendgrid, Twilio, Nexmo, Twizo. Social share - Social Sharing Plugin For Private Use only (Code without error checking)
Social share - Social Sharing Plugin For Private Use only (Code without error checking)

Flutter Social Share plugin for sharing file to media with multiple (More option

Easy social network authorization for Android. Supports Facebook, Twitter, Instagram, Google+, Vkontakte. Made by Stfalcon

SocialAuthHelper A library that helps to implement social network authorization (Facebook, Twitter, Instagram, GooglePlus, Vkontakte). Who we are Need

✨ Social network app made with Android Compose, full Kotlin, Firebase Authentication, Storage and Firestore 🚀
✨ Social network app made with Android Compose, full Kotlin, Firebase Authentication, Storage and Firestore 🚀

Your friends, for real. Share daily random moments with your friends and discover who they really are. ✨ Instant Instant is a social media actually un

🍓CookHelper - food social network. The Api and Websocket are based on Ktor framework. Dependency injection with Koin library.

CookHelper [ 🚧 Work in Progress 🚧 ] CookHelper is a cross-platform application that will allow you to cook a delicious dish from an existing recipe

SwitchButton 是 Android 上的一个开关按钮控件 【Deprecated】【Stop maintenance】
SwitchButton 是 Android 上的一个开关按钮控件 【Deprecated】【Stop maintenance】

SwitchButton 【Deprecated】【Stop maintenance】停止维护了,推荐使用:https://github.com/zcweng/SwitchButton SwitchButton 是 Android 上的一个开关按钮控件 示例 APP 扫描二维码或点我下载 特性 支持

Stop crashes from closing your game

CrashPatch Discord server (CLICK HERE TO GET SUPPORT) CrashPatch is a Minecraft

Stop Watch App With Compose Desktop
Stop Watch App With Compose Desktop

StopWatchComposeDesktop If You Want StopWatchComposeMobileApp - https://github.

A small Android project to practice executing network requests and parsing the network response
A small Android project to practice executing network requests and parsing the network response

InspirationalQuotesExercise A small Android project to practice executing network requests and parsing the network response This app uses the ZenQuote

Compact and easy to use, 'all-in-one' android network solution
Compact and easy to use, 'all-in-one' android network solution

Deprecated Unfortunately due to many reasons including maintenance cost, this library is deprecated. I recommend to use Retrofit/OkHttp instead. Curre

Check out the new style for App Design aims for the Online Plant Shop Service...😉😀😁😎
Check out the new style for App Design aims for the Online Plant Shop Service...😉😀😁😎

PlantShopUI-Android Check out the new style for App Design aims for Online Plant Shop Service... 😉 😀 😁 😎 Screenshots Please click the image below

Online Furniture Shop App UI made in Jetpack Compose.
Online Furniture Shop App UI made in Jetpack Compose.

JetComposeFurnitureShopUI-Android Online Furniture Shop App UI made in Jetpack Compose with clean architecture... 😉 😎 (Navigation Components, Dagger

New style for app design Online Sunglasses Shop App UI made in Jetpack Compose.😉😎
New style for app design Online Sunglasses Shop App UI made in Jetpack Compose.😉😎

JetSunglassUI-Android New style for app design Online Sunglasses Shop App UI made in Jetpack Compose. 😉 😎 (Navigation Components, Dagger-Hilt, Mater

New style for app design E-commerce Shop App UI made in Jetpack Compose.😉😎
New style for app design E-commerce Shop App UI made in Jetpack Compose.😉😎

E-commerceShopAppUI-Android New style for app design E-commerce Shop App UI made in Jetpack Compose. 😉 😎 (Navigation Components, Dagger-Hilt, Materi

Comments
  • Can it be integrated with firebase auth?

    Can it be integrated with firebase auth?

    I am interested with this library. I haven't tried it yet though. I wonder if it can be integrated with firebase auth, like account binding for current user?

    suggestion 
    opened by topex-psy 1
Releases(v0.3)
Owner
Fanis Veizis
Fanis Veizis
An Android Library that provides social login for 15 platforms within by RxJava2, Kotlin and Firebase Authentication.

RxSocialLogin The license information for logo is located at the bottom of the document. These instructions are available in their respective language

WindSekirun (wind.seo) 124 Nov 21, 2022
Kotlin Multiplatform project that gets network data from Food2Fork.ca

Food2Fork Recipe App This is the codebase for a Kotlin Multiplatform Mobile course. [Watch the course](https://codingwithmitch.com/courses/kotlin-mult

Mitch Tabian 317 Dec 30, 2022
🚆 Retrofit adapters for modeling network responses with Kotlin Result, Jetpack Paging3, and Arrow Either.

Retrofit Adapters ?? Retrofit adapters for modeling network responses with Kotlin Result, Jetpack Paging3, and Arrow Either. Sandwich If you're intere

Jaewoong Eum 293 Dec 26, 2022
Create kotlin android project with one line of command.

README This is an android application template project built with kotlin language and some useful libraries. It provides a creator script to quickly c

nekocode 1.6k Dec 20, 2022
app conversor de moedas/cambio com Kotlin, no Bootcamp Carrefour Android Developer na plataforma da Digital Innovation One

Status do Projeto: ✔️ concluído a proposta de criação um app conversor de moedas/cambio com Kotlin, no Bootcamp Carrefour Android Developer na plataforma da Digital Innovation One

Luiz Correa 5 Dec 23, 2022
Clean MVVM with eliminating the usage of context from view models by introducing hilt for DI and sealed classes for displaying Errors in views using shared flows (one time event), and Stateflow for data

Clean ViewModel with Sealed Classes Following are the purposes of this repo Showing how you can remove the need of context in ViewModels. I. By using

Kashif Mehmood 22 Oct 26, 2022
Main goal of this project is to find the best route from one country to another

Route-service Main goal of this project is to find the best route from one country to another. Data is presented as json format. I've implemented A* p

Teyyihan Aksu 4 Aug 2, 2022
WorkManager ,One time,Sequential Execution, Periodic time Execution

WokManagerSample WorkManager ,One time,Sequential Execution, Periodic time Execu

Chhote Lal Pal 0 Dec 21, 2021
A pair of applications provide a direct means of integrating with one another via application programming interfaces (APIs)

What is a native integration? It's when a pair of applications provide a direct means of integrating with one another via application programming interfaces (APIs). Once integrated, data can flow between the apps and become more readily available to your employees.

Behruz Hurramov 2 Jan 17, 2022
Mars is an all-in-one plugin for PGM servers

Mars Mars is an all-in-one plugin for PGM servers. Using Mars Contributing to Mars Why? Mars was built to handle everything that PGM isn't supposed to

Warzone 6 Feb 13, 2022