📱 Simple Basic Autentication with SteemConnectV2 in Android Platform

in #utopian-io6 years ago (edited)
Hello Android Steemian Native Developers here I bring you this joker I have little time in steemit but nevertheless I tell you that he invested enough time in the development an application for SteemChurchApp I am the creator / Developer and I have had the need to perform the authentication module with steemconnect Here is an example of how to do it and soon many more things I hope to see you very useful for all of you.

imagen JPG MINIMUM REQUERIMENT.jpg

Repository

https://github.com/juanunix/steem-connect-android

What Will I Learn?

-We will learn how to make a small application on android
-We are going to make a creation of an application in the steemconnect service
-We will learn how to perform an authentication with the steemconnect service for android
-Let's learn how to use the browser widget for android

Requirements

1.-you must have a PC or Laptop with minimum requirements of 64 Processing Bits and 8GB of RAM
2.-you must have installed and configured Android NOX Emulator not indispensable you can use other like the one that brings Android Studio you can download it from this page https://www.bignox.com/
3.-Java is installed on the machine with the necessary configurations explained on this page. https://www.java.com/en/download/
4.-It has also installed the Android Studio in its latest version to have no problems downloaded and installed from the next page https://developer.android.com/studio/install?hl=en-419

Required Knowledge:

1.-Understanding of API REST
2.-Understanding of Java Programming Language
3.-Understanding of Android Studio

Difficulty

Intermediate

Tutorial Contents

1.-We create a Project and we put the name creating the Project

2.-We create two activities with their xml one called LoginActivity and MainActivity

In the manifest file

we defined the two activitys with two special configurations as intent-filter

In the activity MainActivity
cdsgcuoamc.png

we indicate that it is the main activity and that is the one that is going to be launched every time the application starts

In the LoginActivity
jxr7wzp3az.pngPhoto

we indicate four inten-filters with possibility of view, navigable and by default

in the OnCreate event in MainActivity
nwwv6fgqwd.png

we create a variable of type string with the url with the authentication path then we made a Uri type parse Afterwards we created an Intent with the uri in we started the activity of LoginActivity this redirects us towards the steemconnect authentication service

In the activity_main (Layout)
08pr66lykn.png

we will only place a simple button to make the call to the next activity

LoginActivity.java
1z6kgx3yt0.pngPhoto

verify if the received Intent is different from null then we created a Uri to get it from the Uri then we verify if it is different from null and we get the username of the getQueryParameter ("username") method later we set it in the textview of the LoginActivity obtaining the username indicates that we are authenticated as we can also receive the code and many more values ​​that will serve us for future implementations such as voting, posting, commenting among others

In the layout of the LoginActivity
fbg5jsfvg8.pngPhoto

We will only create a Simple TextView that will serve us to show the user logged in

#SteemConnect in action!

#MainActivity

LoginEmu.png

#SteemConnect Validating From Browser

SteemConnectEmu.png

#SteemConnect From from Browser
SteemConnectAutEmu.png

Soon I will launch a more advanced version 2 of autenticacoin with steemconnect explaining how to create an official app for the steemconnect service

Thanks Regards
juanunix

Sort:  

Thank you for your contribution.
This moderation might not be considered due to the below:

  • The repository doesn't work.
  • Code sections are better displayed using the code markup, instead of placing them as screenshots.

Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Good job, I am witness to the effort that my husband @juanunix is ​​doing during the development of the mobile application of the church @steemchurch, an arduous job and now brings you here in utopian the way to teach how to use steemConnect I hope everyone likes it and even more interesting tutorials come from basic, medium, advanced and for the gods of programming :)