{"id":5379,"date":"2024-12-27T16:18:46","date_gmt":"2024-12-27T16:18:46","guid":{"rendered":"https:\/\/obsidiansofteducation.com\/?page_id=5379"},"modified":"2024-12-27T16:25:04","modified_gmt":"2024-12-27T16:25:04","slug":"app-inventor-firebasedb-tutorial-signup-login-screen","status":"publish","type":"page","link":"https:\/\/obsidiansofteducation.com\/index.php\/app-inventor-firebasedb-tutorial-signup-login-screen\/","title":{"rendered":"App Inventor Firebasedb Tutorial \u2013 Signup Login Screen"},"content":{"rendered":"\n<p>Hello friends and welcome to Obsidian Soft<\/p>\n\n\n\n<p>Many friends had requested a tutorial for Firebase DB in MIT App Inventor so today I will teach you the easiest steps for setting up the Firebase database, connecting it to our MIT App Inventor app, and storing or getting data from it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/snake20game201.png\" alt=\"\" style=\"width:473px;height:auto\"\/><\/figure>\n<\/div>\n\n\n<p>After watching this tutorial, you should be able to convert any app that uses cloudDB into a Firebase database app such as my chatting app, quiz app, customer record app, etc.&nbsp;<\/p>\n\n\n\n<p>First, let\u2019s make a simple user interface for our app.&nbsp;<\/p>\n\n\n\n<p>Open up MIT App Inventor and start a new project. Give it an appropriate name.<\/p>\n\n\n\n<p>For screen 1, make align horizontal and align vertical both center. Make the background color: blue.<\/p>\n\n\n\n<p>Add a text box from the User Interface palette.<\/p>\n\n\n\n<p>Rename it to nameTxt and make background-color: white.&nbsp; Make the width 50%, height 8%, font bold, and font size 20. Change the hint to \u201cEnter user name\u201d<\/p>\n\n\n\n<p>Add a password textbook from the User Interface palette. Rename it to passTxt.<\/p>\n\n\n\n<p>Give similar properties as nameTxt. Make the background color: white, font bold, font size&nbsp; 20.&nbsp; Make its width 50% and height 8%.&nbsp; Change the hint to \u201cEnter password\u201d<\/p>\n\n\n\n<p>Add an empty label from the User Interface palette with height 1% between these two textboxes for spacing.<\/p>\n\n\n\n<p>Add a horizontal arrangement from the Layout palette.<\/p>\n\n\n\n<p>below the text boxes.<\/p>\n\n\n\n<p>Make align horizontal and align vertical both center.<\/p>\n\n\n\n<p>Make height 15% and width fill parent.<\/p>\n\n\n\n<p>Drag and drop a button from the User Interface palette inside this horizontal arrangement. Rename it to loginBtn. Make the background color black. Make font bold, font size 22, width 35%, and change text to Login and color to white.<\/p>\n\n\n\n<p>Select this button and duplicate by pressing&nbsp;<strong>Ctrl + C and Ctrl + V<\/strong>&nbsp;on the keyboard for Windows OR&nbsp;<strong>Command + C and Command + V<\/strong>&nbsp;on the keyboard for MacOS. Rename it to signupBtn and change the text to Signup.<\/p>\n\n\n\n<p>Add an empty label with a width of 2% between these two buttons for spacing.<\/p>\n\n\n\n<p>Add a Firebase component from the Experimental palette. Also, add a notifier component from the User Interface palette.<\/p>\n\n\n\n<p>Now, we have to create and set up our Firebase realtime database.<\/p>\n\n\n\n<p>Search for Firebasedb in Google and choose the first link. I will also give this link in the video description.<\/p>\n\n\n\n<p><a href=\"https:\/\/firebase.google.com\" target=\"_blank\" rel=\"noopener\">https:\/\/firebase.google.com<\/a><\/p>\n\n\n\n<p>Make sure that you have logged in with your Google account.<\/p>\n\n\n\n<p>Then click on \u201cGo to console\u201d button.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/B3PzlceBq6UI1piWZOUQbfvsgr6E1kZSUk1rZ3Udpzhho4WNoL4RkLd13muYDQlzr6DpcWje2t2bYroWgMRc3USXTZIjZHgWSPsAbZ83Co1AanhaYVj6Etnlz6ghRjVt8uAqKk5HQoOP5wC53hrqII0.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Click on Add Project.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/Up0ynm1IcbkBAv3NnIYytsV9ndbObFsEecEvKDR2qyowAl6xJq7gl_duVMYCf0KH-A0Wdh5oaTsBsYjnucqG8e9gRUw_FrcPy53zLFU5NKKEWC9mHoNd_GjCHPqHrN5rBbDafIoici3ilKZ14Vl-r8.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Give it an appropriate name.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/tNWP4EeVVlnntogm3PpOnuT8NXmyUliuqQOsD7CuJkw0wtejVchcDUscsTSUkceDylZst5pFPfCT2GRKX_Pnk6PgwO_-WRWbckkwaBDKagnkLQPXNET-di1B50RCcgd6osMgexeN4DgKnBLyVHmz-E.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Accept the terms of service if they ask and click on the Create button.<\/p>\n\n\n\n<p>Click on the Continue button on the Google Analytics screen.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/eGXFAv65Pu01OleqKKzrgRkZbmPkzbluTqwbXszK4zscPVCn5bfklzrQ48kkL923ybiqQGP-_ihT0wzF4WbD9p9M4MJmaJ3qD1l1BI_ZN-GffPTN1LMeex1TxMERoPVUv0jX7ttKlL1Hvhg3BJtiyTY.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Add a Google Analytics account and press the Create Project button. It will take some time.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/X2Akg67h0fU2n0aIHEB58UINdXNSBnJDUxaksHQ_2by7Dg0V2RxVscC5M1ZxhKF3CJLs3lxo5uNLMMp7BJhINPiM_ARde__4ABbVLn7P5N8HEJpOJ8lmYnUfTLPKl7UAifOsIDVtYnGTMP05WfAR7RU.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The Project overview window will open.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/qreL8QLXcprWlydG7732O9LOzrx3hlmem9kzKUi4dvSbj0Jwt1z9CT7FATUpvD8pVPVZrUW57_mexBezMFU6Ku2ecNM956Zq5SkWTn7pnp4ntW7JBHLwFPyImT6xlLbMwMqjVM2JMqsgq8sFH_skTu0.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Click on All products and in the dashboard, choose Realtime Database.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/fvDe0YMUCguMHLOkKX_uNUH0sPhx48WkpFa9VAwQVT-4kHEoSFr4J5C4Uon2vKP4nG0eeqOgw-szz2bEtqAoJcIJDWQrUil8TZnGh6nqx98rk4hktFA54p9mzsILN2ibtRlKW33j-0zo8Q7-XaNjMXs.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Click on the Create Database button.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/VqGsfiB1DgP11fT80-kj-ZUM-ZIwt5AJ_IXviokDjYzmL342V-_zGI5x6znD9RGmaRBW9tIOsi8b8aHso3abjVG6ePEBUc8_kIxC6XnxTcpDC_g7dJVCYEIcaaMoeIlVIMvJHQycKADgRizIRqJTV6U.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now, we have to set up our realtime database. First, choose the location.<\/p>\n\n\n\n<p><strong>Very important:<\/strong>&nbsp;Choose the&nbsp;<strong>United States<\/strong>&nbsp;option otherwise Firebase db component will give an error in your app.<\/p>\n\n\n\n<p>Click on the next button after choosing the location.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/esrN5xcU0TBLyRh6VpSjLzMf2B4JpntbZuG2yWpLuck4cQlhZ0xUtdXKz3T_OR-vfpjAS02VNzkAp81PDW4HMr1-mIbkYk9DFjxj4ZnYshUwgNkGsBNKRPTBOJ3Otzp3Wghhx8eT-flQaU049V6Yw0o.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Let it stay in locked mode and click on the Enable button. The database will be created.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/NXxDDPBCZQdt3VKzpF1aOPULjfUHnXCMS39g8_jmEIbLe9UZVXO3MBxva09oUAuToGczmWfHxYV1qovAM6vDVBYbvU1Cnm0h_LypzBWsH8QAEpnWJS4-ywIHNDHOtT0M2sP8puB9_XKHbovjX9dftv0.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Once it has been created, go to rules.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/YZgNk9CkadLldp9fWPE_wpYGHwRMMJUbbanAJolmZaoJFVBa766m0Qgg4fof3jpONzQIPU8G8aWJHgfiLD3DbLgwXXLB_tXQkTQmklZuQ2m8AsLdX6wyfDzwAthxWqqwqgmiNYLwuvd4QGAJcnXs85c.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Make read and write true.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/0MnJk-qISBlQD6CDfyavABPeWQ7LKftR_25ZfJ1V_HUSP902YcWuNLb4GSnft9bi1V3RB0NEKv0uA32wNKGSewnxOsEfI8bo2eZSq3-AL7YzbH8kbjXdjS6oeMwK4eDawLSuOyZVgGYRGerp1CjfYmk.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Publish these changes.<\/p>\n\n\n\n<p>This is a free plan called&nbsp;<strong>Spark<\/strong>&nbsp;and you are allowed 100 connections at a time and 1 GB data storage.&nbsp;<img loading=\"lazy\" decoding=\"async\" height=\"280\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/4QI-WGnZRmxQi8Wwxrk8m8q4lC9R_i6ec5508RvooRyimJnY0zyULfKI3E3pc05CVEI4S75q5PJWXncPYUtt2jkQCUu4DesoSy9KAUCgxF3bsW_4JjHeyWOlOgwHZYkp7suX0inKWPb9ca60DQCed2M.png\" width=\"602\"><\/p>\n\n\n\n<p>If you want more storage and connections, then upgrade from this plan.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/Z6LTvJyJaVBuLmE8mujzXuw44H6CzMj7pRyXQ-J9pzS46Nk-W1d9YIib51eq5ym1mz3Krig4yYGpe4JzlYIfuYz2XOMwHah-MnBG1e9aliRI-S31_K-BCmyGTDDHmSzso3bnhFPnkq9y9WZ8m3OQb2M.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now go to the data tab and click on that pin-like icon to copy the URL.<\/p>\n\n\n\n<p>Go back to your project in MIT App Inventor. Uncheck the \u201cUse default\u201d checkbox in firebaseDB component\u2019s properties and paste the copied URL in the firebaseURL field.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/lFoVAdfcfZlCROC9vhD3wocn50uG_Kl73hJP-covfSnMbIwuv-XRh7awKXCyozYNRny_2C83QlzPYGMGp8O4aEeZn9pyj9FoWxHu5nFcdZjWhIHmjXokzfQ-tTlbL8wUYctWMomOydFrgGua66O4mNU.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Add another screen with just a label saying &#8220;Welcome&#8221;.<\/p>\n\n\n\n<p>Now go to the blocks section. The code is the same as the one for the CloudDB app.<\/p>\n\n\n\n<p>When the signup button is clicked, we will store the password as a value against the user name as a tag in the firebaseDB.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/CkFaxA5w73ceRz3fD2apRYA1evrP3eVGJxhXiReBIAWD8A4G56IRIAz7PcogZvBT6h3-GYerhYXXr7l8-ERY7drnzHinVU2__QAezcYKzGNQ35h6ttxMmrqobUnDgSEmhb98NPd_7EaXodr7IJYpjAY.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>When the login button is clicked, we will get the password against the user name.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/tP1CdybIZZ3RaMFnaFSzJk6gqXTLvKGgUM7I8sgwVSHiZV16FDr4lkEnulxdu2wvDxPL-lm8wInd6gzQLzll1e7-gy2q6bHNpuWaUGEA8SfXEyUcyMQ15EIuBwMGq84PQx22e-9rZbtjwUcOlwDQc6M.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>The getValue procedure will trigger the GotValue event. Here, we will check if the entered password is the same as the password retrieved as the value against the tag user name from the database. If it is the same, we will let the user log in and take him to the second screen. If not, we will show a message using the notifier.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/snIqr2yAErHRmsfImMdcKb1gqeqVkzyfn6NUOdGnABMbhPK9h41h8NP8dFWxSfmhdKjNP6zfVtB8mfm5K0PBEq655THWhyWGHbymVqmXCRZQ6K6kMcr3BnJK4YySokR_PYE4aNqW6XJ4n3N1fESDCF0.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>So, this is done and you can see how easy it was to setup Firebase database and connect it to an MIT App inventor app.<\/p>\n\n\n\n<p>I hope you liked this tutorial.&nbsp;<strong>Happy Coding!<\/strong><\/p>\n\n\n\n<p>If you like my tutorials, consider supporting me:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/obsidiansoft.gumroad.com\/l\/cxdft\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"372\" height=\"196\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/donate-button-1.png\" alt=\"\" class=\"wp-image-5381\" style=\"width:211px;height:auto\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/donate-button-1.png 372w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2024\/12\/donate-button-1-300x158.png 300w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>You can also have a look at the video tutorial for this app:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<p class=\"responsive-video-wrap clr\"><iframe loading=\"lazy\" title=\"App Inventor Firebasedb Tutorial | Signup Login Screen | Firebase DB App Inventor\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/AAiyBzyMwX8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<\/div><\/figure>\n\n\n\n<p>Please like my videos and share them with your friends and family. Also, subscribe to my channel and press the bell icon so you don\u2019t miss any of the great projects I have planned for you.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.youtube.com\/c\/obsidiansofteducation\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/c\/obsidiansofteducation<\/a><\/p>\n\n\n\n<p>Please like my social media pages for more educational resources and tips.<\/p>\n\n\n\n<p>Facebook:<a href=\"https:\/\/www.blogger.com\/blog\/page\/edit\/4947000819484484884\/7140650632339107612#\" target=\"_blank\" rel=\"noopener\">&nbsp;https:\/\/www.facebook.com\/ObsidianSoft\/<\/a><\/p>\n\n\n\n<p>Instagram:<a href=\"https:\/\/www.blogger.com\/blog\/page\/edit\/4947000819484484884\/7140650632339107612#\" target=\"_blank\" rel=\"noopener\">&nbsp;https:\/\/www.instagram.com\/obsidiansoftapps\/<\/a><\/p>\n\n\n\n<p>Pinterest:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-pinterest wp-block-embed-pinterest\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oceanwp-oembed-wrap clr\"><iframe loading=\"lazy\" title=\"Obsidian Soft\" src=\"https:\/\/assets.pinterest.com\/ext\/embed.html?grid=obsidiansoft&#038;src=oembed\" height=\"900\" width=\"450\" frameborder=\"0\" scrolling=\"no\" ><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<p>For links to free educational apps, have a look at the&nbsp;<a href=\"https:\/\/obsidiansofteducation.com\/index.php\/mobile-apps\/\">educational apps page<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello friends and welcome to Obsidian Soft Many friends had requested a tutorial for Firebase DB in MIT App Inventor so today I will teach you the easiest steps for setting up the Firebase database, connecting it to our MIT App Inventor app, and storing or getting data from it. After watching this tutorial, you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5379","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/5379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/comments?post=5379"}],"version-history":[{"count":2,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/5379\/revisions"}],"predecessor-version":[{"id":5391,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/5379\/revisions\/5391"}],"wp:attachment":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/media?parent=5379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}