Lietotņu izgudrotājs: izveidojiet Android lietotni - apmācība
Šajā praktiskajā padomā mēs izskaidrojam, kā izveidot Android lietotnes, izmantojot App Inventor. Izpildiet šo mācību, lai izveidotu lietotnes salīdzinoši īsā laikā.
Pierakstieties MIT App Inventor
Dodieties uz vietni App Inventor un augšējā labajā stūrī noklikšķiniet uz pogas Izveidot.
- Lietotņu izgudrotājam ir nepieciešama atļauja, lai piekļūtu jūsu Google kontam. Apstipriniet, noklikšķinot uz Atļaut.
- Pēc pirmās pieteikšanās jūs varat piedalīties aptaujā. Ja jūs to nevēlaties, noklikšķiniet uz “Nekad neveiciet aptauju”.
- Pēc tam noklikšķiniet uz “Turpināt” uz App Inventor darbvietu.
App Inventor izveidojiet pirmo lietotni - izkārtojumu
- Augšējā kreisajā stūrī noklikšķiniet uz pogas "Jauns projekts". Ievadiet projekta nosaukumu un atlasiet “Ok”.
- Tagad velciet "Label" no "User Interface" kreisajā pusē ekrānā, kas parādīts vidū. Sadaļā “Properties” varat mainīt marķētās tikko pievienotās etiķetes “Text”.
- Saglabājiet projektu, izmantojot "Projekts", un atlasiet "Saglabāt projektu".
- Tagad visus pārējos lietotāja interfeisa elementus varat slīdēt uz ekrāna. Citu multivides saturu var pievienot arī, izmantojot “Zīmēšana un animācija”.
- Izmantojiet "Izkārtojums", lai mainītu elementu izkārtojumu.
Loģika pār blokiem - piemērs
Ja vēlaties savai lietotnei izveidot papildu ekrānus, noklikšķiniet uz “Pievienot ekrānu”. Pēc tam, piemēram, varat doties uz otro ekrānu izkārtojumā, izmantojot UI elementu "Button". Tomēr, lai to izdarītu, jums ir nepieciešama loģika, kas darbojas fonā. Lietotņu izgudrotājā tos izveidojat, izmantojot sadaļu “Bloki”.
- Lai to izdarītu, augšējā labajā stūrī noklikšķiniet uz “Bloki” blakus “Dizainers”. Tur jūs ejat uz atbilstošo ekrānu un noklikšķiniet uz pogas kreisajā displejā "Blocks".
- Atlasiet funkcionalitāti "kad Button1.Click do".
- Tagad šajā elementā "Puzzle" ievietojiet elementu "Vadība", proti, "atveriet citu ekrāna screenName".
- Tagad trūkst tikai segvārda. Lai to izdarītu, bloku displejā noklikšķiniet uz "Teksts" un atlasiet augšējo elementu, kas sastāv tikai no divām pēdiņām.
- Šajā teksta elementā, šajā piemērā "Screen2", ievadiet ekrāna nosaukumu.
Pārbaudiet lietotni viedtālrunī
Ja vēlaties pārbaudīt savas lietotnes, kas izveidotas App Inventor, tieši savā Android viedtālrunī, veiciet tālāk norādītās darbības.
- Instalējiet lietotni MIT App Inventor Companion savā Android viedtālrunī.
- Pārbaudiet, vai jūsu dators un Android viedtālrunis darbojas tajā pašā WiFi tīklā.
- Viedtālrunī atveriet lietotni un datora augšējā izvēlnes joslā noklikšķiniet uz “Savienot” un atlasiet “AI Companion”.
- Viedtālruņa lietotnē pieskarieties “skenēt QR kodu” un skenējiet datorā parādīto QR kodu. Alternatīvi ievadiet 6 ciparu kodu, kas parādīts lietotnes teksta laukā, un pieskarieties pogai “savienot ar kodu”.
- Tagad šo lietotni var izmēģināt savā Smarpthone.
Pārbaudiet lietotni ar emulatoru
Ja jums nav pieejams viedtālrunis, pārbaudiet savu lietotni emulatorā, kas integrēts lietotņu izgudrotājā.
- Lejupielādējiet un instalējiet programmatūru App Inventor.
- Tagad atveriet instalēto lietojumprogrammu. Datorā tiek atvērts mobilā tālruņa ekrāns.
- Tagad atvērtā projekta App-Inventor izvēlņu joslā noklikšķiniet uz “Savienot” un tur atlasiet “Emulators”. Jums, iespējams, būs jāpieskaras “Atiestatīt savienojumu”, ja iepriekš bijāt izveidojis savienojumu ar viedtālruni.
- Tagad lietojumprogramma tiek parādīta emulatorā.
- Dažos gadījumos jūs redzēsit kļūdas ziņojumu. Tāpēc lietotne Companion vairs nav aktuāla. Pēc tam parādītajā logā noklikšķiniet uz "Labi".
- Apstipriniet atjauninājumu emulatorā ar "OK" un "Install". Visbeidzot emulatora ekrānā noklikšķiniet uz “Gatavs”.
- Pievienojiet vēlreiz, izmantojot "Savienot" -> "Atiestatīt savienojumu" un pēc tam - "Savienot" -> "Emulators".
Kad esat izveidojis savu lietotni, izvēlnes joslā varat saglabāt lietotnes .apk failu datorā izvēlnes joslā, izmantojot “Build”. Kad esat publicējis lietotni pakalpojumā Google Play, jums vajadzētu padomāt arī par savas lietotnes mārketingu.