MASIGNCLEAN101

Android How to Change Default Aws Mobile Hub Login Screen Updated FREE

Android How to Change Default Aws Mobile Hub Login Screen

Setting up Facebook login and user data storage in your app with AWS Mobile Hub is really easy.

Amazon Spider web Services' Mobile Hub is a groovy way to quickly add features to your mobile application.

Mobile Hub can integrate many different features. Information technology generates a base app for you, and all the features y'all choose to add volition already be prepare and ready to use. By taking care of boiler-plate code, Mobile Hub frees you upward to focus on the business portion of your app.

AWS provides generous free limits. And Mobile Hub is a corking Parse replacement for those transitioning off that platform.

This tutorial covers how to add 2 common features:

  • User sign-in
  • User data storage

Setting up Facebook login with AWS Mobile Hub

Facebook login is a popular choice for mobile. Users don't demand to remember yet some other username and password. And OAuth helps confirm the user's identity, so you don't take to expect for the user to verify their email address.

Before you lot utilise Facebook login, you need to generate a Facebook App ID for your app.

To generate an App ID:

one. Navigate to https://developers.facebook.com/quickstarts and select your platform. Create an business relationship if necessary.

0.0 facebook

2. On the next page, Click Skip and Create App ID.

3. Fix proper name of app, contact email and app category, then click Create App ID.

0.2 app id bordered

4. On the Product Setup page, Click Get Started next to Facebook Login.

five. In the Facebook Login settings, disable Web OAuth Login. Click Save Settings.

0.4 login

6. For now Facebook login will only work with the account y'all generated this app ID with. If you want it to work with whatever Facebook user, you must set this Facebook app to public.

To do this, go to https://developers.facebook.com/apps and select your app. Click App Review on the left, and prepare the get-go option to On.

Capture

The Facebook Login setup is now complete. Note the App ID in the upper left corner.

two) Set upward user login for Mobile Hub

The next step is to gear up user login for AWS Mobile Hub and connect the Facebook user login you lot just created.

i. Navigate to https://aws.amazon.com/ and sign in. Create an AWS account if necessary.
2. On the AWS dashboard, under Mobile Services, click Mobile Hub.

1 dashboard

3. Click Get Started, and if an alert appears, click Yep, grant permissions.

Be warned, by clicking yes y'all are giving your app the permission to use AWS resources. This means if you go over the free limits for any Amazon services, your credit carte will be charged. You lot can keep track of your limits at https://console.aws.amazon.com/billing.

3 alert bordered

4. Name your projection. For this example, I chose SignInExample. Click Create Project.

5. The base project has been created. In order to give this app user sign-in and data storage, you have to configure those features. Click User Sign-in.

5 configure

6. If you want to requite users the choice to sign in to your app, click Sign-in is optional. If you want sign-in to be a requirement, click Sign-in is required.

vii. Under "How can users sign in?" click Facebook. Paste the App ID that was generated in the first section of this tutorial. Click Save changes, so Configure more features.

7 facebook

viii. Now that sign-in is configured, you need to configure user data storage. On the dashboard, click User Data Storage.

9. Adding the information storage characteristic is every bit simple as clicking Store user data, and then Save changes.

ten. To finish building the app, click Build your app.

data storage

11. On the next screen, cull the platform you lot desire to utilise (iOS, Android, etc.). Be sure that this matches the platform you chose during the Facebook setup.

Click Download source package when the package is prepare.

10 build android

12. Unzip the downloaded file, and extract the MySampleApp folder.

13. In order to finalize the Facebook sign-in setup, you demand to give Facebook a little more than data nearly the app. Navigate to https://developers.facebook.com/apps and select your app. Click Settings on the left.

14. Click Add together Platform.

11add platform2

At this indicate, if you're developing for Android, jump to footstep xvi. If y'all're working on an iOS app, read step 15.

fifteen. Select iOS as the platform. Under Package ID, type com.amazon.MySampleApp. Click Save Changes. You're done! Click here to skip the remaining steps for Android and jump to the finish of this section.

13 apple platform

16. If y'all're developing for Android, select Android as the platform. Nether Google Play Package Proper name, type com.mysampleapp. Under Class Name, blazon com.mysampleapp.MainActivity.

After clicking Save Changes, an alert volition appear. Every bit long as you lot haven't publicly listed your app on the Google Play Store, you tin click Use this package name.

14 alert

17. With Android, a key hash is also necessary. Import the downloaded binder (MySampleApp) into Android Studio. When the projection is finished importing, open the concluding in Android Studio.

On a Mac, effect the command keytool -exportcert -allonym androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

On Windows, issue the command keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%.androiddebug.keystore | openssl sha1 -binary | openssl base64

xviii. If prompted for a keystore password, hit Return. The app's primal hash will be printed to the terminal. Copy this and enter it under Key Hashes. Click Salve Changes .

12 android platform

The base of operations app is now complete. The app downloaded from Mobile Hub has Facebook login and user information storage already integrated, and even includes in-app demonstrations for these features. Feel costless to build your own app using the generated app as a lawmaking base.

If you're interested in exploring the pre-built demonstrations (for Android), continue to the adjacent section.


Mobile Hub In-App Demos

In order to demonstrate the functionality of included features, Mobile Hub provides pre-built demos inside the app.

Sign-in

As presently as the app opens, you volition see a Facebook button. Clicking it brings up the Facebook login screen.

combined 1

After logging in, you lot volition exist taken to the app's dwelling house page. If you click the hamburger menu button on the upper left corner, yous will run across your Facebook name and contour motion picture. All profile-specific data volition be passed to some other device if you log in to the same account on another device!

combined 2

Data Storage

In guild to prove how user data storage works, AWS Mobile Hub includes two demonstrations.

The start demo is a elementary theme selector.

From the dwelling page, click User Data Storage, then Demo User Profile Information. The adjacent screen has 4 buttons, and clicking on i will change the app's theme colors.

combined 4

combined 5

If you sign in to the same profile on a unlike device, you'll find that the theme is changed on that device as well.

themechange

The 2nd demo is a user file storage app. Users can upload files to a public or private binder.

From the User Data Storage folio, click Demo User File Storage. The next screen shows the private and public folders.

combined 6

Click the Private folder to open up it. For now, it's empty. Click the carte push button on the upper correct corner. Click Upload to upload a file of your selection.

device-2016-07-14-150820

The file will now announced in the Private binder. If yous sign in to the same user on a unlike device, you'll notice that the file you chose is still in that binder. You lot tin download the file if you lot cull to.

compare 2


Conclusion

At the end of this tutorial, y'all should take a base of operations app with working user sign-in and data storage. From here yous can change the code to have the features work in any manner you please.

You could make a to-do list that uses information storage to conduct the list over to another device, a game that uses data storage to save progress, or many other uses. The possibilities are endless!

If you follow this tutorial and brand something interesting, go out a comment! We would honey to hear from y'all.

Thanks for reading my tutorial on AWS Mobile Hub. If you have any questions or suggestions, feel complimentary to comment below!

Similar this post? Please share information technology using the share buttons to the left! Then follow united states on Twitter – @thorntech – and sign up for our programmer mailing list below for future updates.

Android How to Change Default Aws Mobile Hub Login Screen

DOWNLOAD HERE

Source: https://www.thorntech.com/aws-tutorial-user-sign-in-and-data-storage-with-mobile-hub/

Posted by: 7newsonlinetty.blogspot.com

Share This :