{"id":7041,"date":"2026-08-19T18:25:38","date_gmt":"2026-08-19T18:25:38","guid":{"rendered":"https:\/\/obsidiansofteducation.com\/?page_id=7041"},"modified":"2026-08-19T18:25:40","modified_gmt":"2026-08-19T18:25:40","slug":"face-recognition-app-in-mit-app-inventor","status":"publish","type":"page","link":"https:\/\/obsidiansofteducation.com\/index.php\/face-recognition-app-in-mit-app-inventor\/","title":{"rendered":"Face Recognition App in MIT App Inventor"},"content":{"rendered":"\n<p class=\"has-medium-font-size wp-block-paragraph\">Hello friends, and welcome to Obsidian Soft.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Today, I will teach you how to make a Face Recognition App in MIT App Inventor.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">So, let\u2019s begin. First of all, we need to make a free account in Face++<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/www.faceplusplus.com\/face-comparing\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.faceplusplus.com\/face-comparing\/<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Now, remember that this free account has a limited usage plan, which is enough for experimentation and some fun. The goal today is to show you a practical MIT App Inventor Project with API integration. If you want to use it professionally and make a student or employee attendance system with more usage, you will have to get a proper billing plan on <strong><a href=\"https:\/\/www.faceplusplus.com\/face-comparing\/\" target=\"_blank\" rel=\"noopener\">Face++<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Open <a href=\"https:\/\/www.faceplusplus.com\/face-comparing\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.faceplusplus.com\/face-comparing\/<\/a> and click the <strong>Start Free <\/strong>buton.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"498\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_srpNuQWiAk-1024x498.png\" alt=\"\" class=\"wp-image-7043\" style=\"aspect-ratio:2.0563035495716036;width:699px;height:auto\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_srpNuQWiAk-1024x498.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_srpNuQWiAk-300x146.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_srpNuQWiAk-768x374.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_srpNuQWiAk-1536x747.png 1536w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_srpNuQWiAk.png 1805w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Click on the Sign up for Face++ button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"515\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_t2k1aqtumo.png\" alt=\"\" class=\"wp-image-7044\" style=\"width:614px;height:auto\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_t2k1aqtumo.png 785w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_t2k1aqtumo-300x197.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_t2k1aqtumo-768x504.png 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Fill up the text boxes with the required information such as user name, email and password.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"536\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_Z2MgfhxVka.png\" alt=\"\" class=\"wp-image-7045\" style=\"aspect-ratio:1.2854935572269839;width:586px;height:auto\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_Z2MgfhxVka.png 689w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_Z2MgfhxVka-300x233.png 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">You will also have to provide a phone number for account security. After confirming, click on the <strong>Get API Key<\/strong> button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"873\" height=\"666\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_YPgglTadv8.png\" alt=\"\" class=\"wp-image-7046\" style=\"aspect-ratio:1.3108358529210962;width:695px;height:auto\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_YPgglTadv8.png 873w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_YPgglTadv8-300x229.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_YPgglTadv8-768x586.png 768w\" sizes=\"auto, (max-width: 873px) 100vw, 873px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Copy the API Key and the API Secret and paste them into Notepad\/TextEdit, as we will need them later in MIT App Inventor.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"284\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_AwtT1QvyHG-1024x284.png\" alt=\"\" class=\"wp-image-7047\" style=\"width:655px;height:auto\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_AwtT1QvyHG-1024x284.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_AwtT1QvyHG-300x83.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_AwtT1QvyHG-768x213.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_AwtT1QvyHG-1536x427.png 1536w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/ApplicationFrameHost_AwtT1QvyHG.png 1627w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Now, we need two extensions for this app.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We need an extension for converting images to base64:<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"http:\/\/kio4.com\/appinventor\/277_extension_imagen_string.htm\" target=\"_blank\" rel=\"noopener\">http:\/\/kio4.com\/appinventor\/277_extension_imagen_string.htm<\/a>&nbsp;<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Choose the one that says: com.KIO4_Base64.aix&nbsp; and download it.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We also need an extension for resizing the images to reduce their size, as Face++ has a 2MB\u00a0 limit on the image size.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/puravidaapps.com\/image.php\" target=\"_blank\" rel=\"noopener\">https:\/\/puravidaapps.com\/image.php<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Download the .aix file.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Now, open up MIT App Inventor. And go down on the left side and under extensions, upload the two extensions and add them to the project by dragging them onto the viewer.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Then, in screen1\u2019s properties, make align horizontal and align vertical both center, and make screen orientation portrait.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Drag and drop an image component from the User Interface palette onto the viewer.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Now, add horizontal arrangement from the Layout palette below it.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">In its properties, make align horizontal and align vertical both center.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Make height 10% and width fill parent.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Drag and drop a Textbox from the User Interface palette inside this arrangement and rename it to nameTxt.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Then, put a button on its right. Rename it to registerBtn.&nbsp; Make the background color green, font bold, font size 20, and change the text to: Register<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Select this button. Duplicate it by pressing Ctrl+C &amp; Ctrl+V on the keyboard for Windows and Command+C &amp; Command+V on the keyboard for macOS.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Rename to checkBtn. Change the text to Check Photo.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Add a label below this checkBtn. Rename to resultLbl. Make the font bold, font size 22, and remove all text from it.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Add a Web component from Connectivity for calling the Face++ API.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Add a TinyDB component from Storage for storing our registered photos.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Add a Camera from Media for taking pictures.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Add a notifier from the user interface for showing messages.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">The screen design is done, so let\u2019s go to the blocks section.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We need some global variables:<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We need a list for storing the registered photos. We need a variable for differentiating between the registering photos and comparing photos scenarios. We need a variable for storing the captured photo for comparison and an index for knowing where we are in the list while comparing a photo with registered photos.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"588\" height=\"219\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image.png\" alt=\"\" class=\"wp-image-7048\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image.png 588w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-300x112.png 300w\" sizes=\"auto, (max-width: 588px) 100vw, 588px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We also need global variables for our api key and secret. Make sure you provide valid keys and secrets.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"102\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-1.png\" alt=\"\" class=\"wp-image-7049\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-1.png 689w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-1-300x44.png 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">When the screen is initialized, we need to load already registered photos, so load data from tinyDB in the screen\u2019s initialize event.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"196\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-2-1024x196.png\" alt=\"\" class=\"wp-image-7050\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-2-1024x196.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-2-300x57.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-2-768x147.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-2.png 1308w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">The register photo button just sets the isRegister variable to true and calls the camera\u2019s take picture procedure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"194\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-3.png\" alt=\"\" class=\"wp-image-7051\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-3.png 610w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-3-300x95.png 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">The check photo button sets the isRegister variable to false and calls the camera\u2019s take picture procedure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"194\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-5.png\" alt=\"\" class=\"wp-image-7052\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-5.png 622w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-5-300x94.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Before we handle the camera\u2019s after picture event, make an empty procedure called \u201ccheckNextPerson.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"370\" height=\"124\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-4.png\" alt=\"\" class=\"wp-image-7053\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-4.png 370w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-4-300x101.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Then, in the camera\u2019s after picture event, we first set the image component on the screen to the captured photo, and we also resize it. Resizing is important as we cannot send huge photos to Face++. There is a 2MB limit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"259\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-6.png\" alt=\"\" class=\"wp-image-7054\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-6.png 682w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-6-300x114.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">After this, we need to differentiate between registering and comparing using the isRegister boolean variable, so get an if\/else block from Control.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">If isRegister is true, we join the entered name, \u201c|\u201d, and getImage (this is the path to the image on your device), and we add this item to the registeredPhotos list. Since the list has changed, we need to store it back in tinyDB.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"294\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-7.png\" alt=\"\" class=\"wp-image-7055\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-7.png 738w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-7-300x120.png 300w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">In the else scenario, we store the capturedPhoto in the global variable that we made for this purpose. We inform the user using the result label that we are going to start checking faces. We make the currentIndex 1, and we call the checkNextPerson procedure. Don\u2019t worry, we still have to work on this procedure \ud83d\ude42.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"195\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-8.png\" alt=\"\" class=\"wp-image-7056\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-8.png 740w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-8-300x79.png 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">So, the final camera. Afterpicture event looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"952\" height=\"1024\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-10-952x1024.png\" alt=\"\" class=\"wp-image-7058\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-10-952x1024.png 952w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-10-279x300.png 279w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-10-768x826.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-10.png 1062w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Now, make an empty procedure called \u201ccompareFaces\u201d that will actually call the Face++ API, but we will work on it later.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"334\" height=\"124\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-9.png\" alt=\"\" class=\"wp-image-7057\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-9.png 334w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-9-300x111.png 300w\" sizes=\"auto, (max-width: 334px) 100vw, 334px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">First, we will work on the checkNextPerson procedure that we had left empty earlier.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We first check that we haven\u2019t checked all the registered photos. We can do this by checking that the currentIndex is still less than or equal to the length of the registered photos list.&nbsp; If it is still less than, then we call our compareFaces procedure. In the else, we just tell the user using the resultLbl that the person wasn\u2019t recognized.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"223\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-11-1024x223.png\" alt=\"\" class=\"wp-image-7059\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-11-1024x223.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-11-300x65.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-11-768x167.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-11.png 1490w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Now, we work on the compareFaces procedure to call the Face++ API.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We first set the web\u2019s URL for calling the API. The URL is <\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/api-us.faceplusplus.com\/facepp\/v3\/compare\" target=\"_blank\" rel=\"noopener\"><strong>https:\/\/api-us.faceplusplus.com\/facepp\/v3\/compare<\/strong><\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">The URL has to be exactly the same. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"114\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-12-1024x114.png\" alt=\"\" class=\"wp-image-7060\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-12-1024x114.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-12-300x33.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-12-768x85.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-12.png 1240w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Then we have to call the web\u2019s postText procedure, but the setting of the text is a bit lengthy, so do it carefully with me.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"206\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-13-1024x206.png\" alt=\"\" class=\"wp-image-7061\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-13-1024x206.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-13-300x60.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-13-768x155.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-13.png 1240w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We need a join block with 8 slots, and the first 4 slots have info related to API key and secrets. Make sure that you get the same spellings.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\">\u201capi_key=\u201d<\/li>\n\n\n\n<li class=\"has-medium-font-size\">The value inside the API key global variable<\/li>\n\n\n\n<li class=\"has-medium-font-size\">\u201c&amp;api_secret=\u201d<\/li>\n\n\n\n<li class=\"has-medium-font-size\">The value inside the API secret global variable<\/li>\n\n\n\n<li class=\"has-medium-font-size\">The fifth slot contains \u201c&amp;image_base64_1=\u201d<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\"><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"515\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-16-1024x515.png\" alt=\"\" class=\"wp-image-7064\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-16-1024x515.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-16-300x151.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-16-768x386.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-16.png 1240w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\">The sixth slot contains the encoded captured photo to base64, so do it carefully.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"169\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-15-1024x169.png\" alt=\"\" class=\"wp-image-7063\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-15-1024x169.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-15-300x49.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-15-768x126.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-15-1536x253.png 1536w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-15.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\">The seventh slot contains \u201c&amp;image_base64_2=\u201d<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"380\" height=\"56\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-14.png\" alt=\"\" class=\"wp-image-7062\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-14.png 380w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-14-300x44.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-medium-font-size\">And the last slot has to be done even more carefully, as we need to extract the image path from the registered photos for that current index and then encode it to base64.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"182\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-17-1024x182.png\" alt=\"\" class=\"wp-image-7065\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-17-1024x182.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-17-300x53.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-17-768x136.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-17-1536x272.png 1536w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-17.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">So the final compareFaces looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-18-1024x412.png\" alt=\"\" class=\"wp-image-7066\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-18-1024x412.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-18-300x121.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-18-768x309.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-18-1536x618.png 1536w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-18.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">If you have seen my previous tutorials, you may already know that when we call Web\u2019s postText procedure, Web\u2019s gotText event is triggered when a response is received from the server.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We first check that responseCode was 200, as 200 means success. In else, we use the notifier to see the error. For professional apps, I will recommend decoding the response content to get the actual error as showing raw error is not a very professional approach but for the sake of simplicity, I am going for this approach. You can check out the json returned in case of error here: <a href=\"https:\/\/console.faceplusplus.com\/documents\/5679308\" target=\"_blank\" rel=\"noopener\">https:\/\/console.faceplusplus.com\/documents\/5679308<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"422\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-19.png\" alt=\"\" class=\"wp-image-7067\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-19.png 966w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-19-300x131.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-19-768x336.png 768w\" sizes=\"auto, (max-width: 966px) 100vw, 966px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">In case of success, we decode the responseContent into a local variable jsonData. <\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">JsonData is a dictionary like this(<a href=\"https:\/\/console.faceplusplus.com\/documents\/5679308\" target=\"_blank\" rel=\"noopener\">https:\/\/console.faceplusplus.com\/documents\/5679308<\/a>) :<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">{<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">&nbsp;&nbsp;&#8220;time_used&#8221;: 473,<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">&nbsp;&nbsp;&#8220;confidence&#8221;: 96.46,<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">&nbsp;&nbsp;&#8220;thresholds&#8221;: {<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&#8220;1e-3&#8221;: 65.3,<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&#8220;1e-5&#8221;: 76.5,<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&#8220;1e-4&#8221;: 71.8<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">&nbsp;&nbsp;},<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">&nbsp;&nbsp;&#8220;request_id&#8221;: &#8220;1469761507,07174361-027c-46e1-811f-ba0909760b18&#8221;<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">}<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">We are interested in the key \u201cconfidence\u201d and its value. If confidence is greater than 80, then we tell the user that face recognized with the person\u2019s name; otherwise, we add 1 to currentIndex and call the checkNextPerson procedure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"697\" src=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-20-1024x697.png\" alt=\"\" class=\"wp-image-7068\" srcset=\"https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-20-1024x697.png 1024w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-20-300x204.png 300w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-20-768x522.png 768w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-20-1536x1045.png 1536w, https:\/\/obsidiansofteducation.com\/wp-content\/uploads\/2026\/08\/image-20.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">And we are done making this exciting face recognition app in MIT App Inventor. Make it today and impress your friends and teachers.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">You can also watch the video tutorials for this Face Recognition App in MIT App Inventor on my YouTube channel for step by step instructions.<\/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=\"Face Recognition App in MIT App Inventor Using Face++ API | User Registration &amp; Setup (Part 1)\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/MmNsmonHlfw?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<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=\"Face Recognition App in MIT App Inventor Using Face++ Compare API | Face Matching (Part 2)\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/HyKFo3MuaV4?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 class=\"has-medium-font-size wp-block-paragraph\">Please like my videos and share it 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 class=\"has-medium-font-size wp-block-paragraph\"><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 class=\"has-medium-font-size wp-block-paragraph\">Please like my Facebook page and Instagram page for more educational resources and tips.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Facebook:<\/strong><a href=\"https:\/\/www.blogger.com\/blog\/page\/edit\/4947000819484484884\/7140650632339107612#\" target=\"_blank\" rel=\"noreferrer noopener\">&nbsp;https:\/\/www.facebook.com\/ObsidianSoft\/<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Instagram:<\/strong><a href=\"https:\/\/www.blogger.com\/blog\/page\/edit\/4947000819484484884\/7140650632339107612#\" target=\"_blank\" rel=\"noreferrer noopener\">&nbsp;https:\/\/www.instagram.com\/obsidiansoftapps\/<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Pinterest:<\/strong>&nbsp;<a href=\"https:\/\/www.pinterest.com\/obsidiansoft\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.pinterest.com\/obsidiansoft\/<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">For links to free educational&nbsp;<a href=\"https:\/\/obsidiansofteducation.com\/index.php\/flappy-bird-game-mit-app-inventor\/#\">&nbsp;apps<\/a>, 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. Today, I will teach you how to make a Face Recognition App in MIT App Inventor. So, let\u2019s begin. First of all, we need to make a free account in Face++ https:\/\/www.faceplusplus.com\/face-comparing\/ Now, remember that this free account has a limited usage plan, which is enough for experimentation [&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-7041","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/7041","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=7041"}],"version-history":[{"count":2,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/7041\/revisions"}],"predecessor-version":[{"id":7069,"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/pages\/7041\/revisions\/7069"}],"wp:attachment":[{"href":"https:\/\/obsidiansofteducation.com\/index.php\/wp-json\/wp\/v2\/media?parent=7041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}