2014년 12월 6일 토요일

Customize the Title Bar in an application

I have developed an application but i see "Screen1" as the title in this application, I need to add images and and resize the title bar. Can i do this in App inventor 2? If so, please reply me about how to do that task.


you can remove the title bar with AppToMarket

You can not add images to the Title bar.   You can not resize the title bar with AI2.     You can add a title with    set Screen1.Title to  , probably in the event handler in the Screen.Initialize block but you could do this using a Button or other ways.

Have you read the AI2 free online eBook  http://www.appinventor.org/book2?  The links are at the bottom of the Web page.  This book teaches you how to program with AI2 blocks and provides a very good overview of what a developer can do with the AI2 entry level Android compiler.

thank you very much for your time... these links helped me get what i wanted :)


Not showing results in AI connection

Anybody having these problems? 
Since the new update I can not connect my phone to the appinventor.

Suggestions are welcome.

Issue solved:

You need to be on the same WIFI network!

ESET now detects AI2 apps as PUA (a variant of Android/Appinventor.A)

Why ESET is detecting all AI2 apps as PUA?

No one?

Please do NOT double post in this forum... When someone has an answer for your question, they'll post a reply.  We DO see all of the posts.

I cannot give you an answer for this.  However, you can certainly search the forum while you're waiting for a response.  Search for "Virus" and you'll find a lot of info and previous responses.

Pizza Party - Display fusion table in web viewer not working

the app works perfectly EXCEPT that it is not showing any content in the webviewer.

I used the original source.

And yes, inserting data works.

What can I do? Or does the app "works as designed"?

do you get a result, if you open the table url in a browser?
if yes, set screen scrollable to false, set webviewer height to fill parent and scroll inside the webviewer

Thank you! Setting screen scrollable to false helped. Rest was already set!


How do you make a code (in this case set up the blocks) to use for logging in, signing out, and singing up?

Please search the forum for "Login Screen."  You'll find ample information...

Please tell us how to delete the list

So, I created a list
When you click the Button1  

The photo must be deleted from the list.

But I do not know how to delete pictures from the list.

1. set global hat = TinyDB.GetValue...
2. remove list item get global hat
                            get global index1
3. TinyDB.StoreValue...

Checkbox for a to do list app

I am a little bit confused on whether I could use the checkbox to create a to do list app. I am sorry I am a beginner. If anyone could give me some general ideas on how I would create a to do app using AppInventor, that would be wonderful. Thank you so much!! 

Sounds like homework to me... and it sounds like you're a bit behind as well ;)!

First, do the tutorials...The tutorials are located here:http://appinventor.mit.edu/explore/ai2/tutorials

A checkbox is merely a switch.  It is either checked or not checked. It can be used to show whether an activity in a to do list is accomplished or not.or it can turn on or off a process or a Boolean switch.  It is a pretty neat component, but not the basis for a 'to do list.'; merely a pretty embellishment in an app.

There might be numerous ways to develop a 'to do list' app.    You will probably need labels, Lists, a place to store information (TinyDB) etc.  Your main tool will be a List.   I would do this with a List, some check boxes perhaps and a bunch of labels.  Others would have other ideas.

For inspiration, try reading the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  In your case particularly Chapters 16, 18 ,19 and 22.


Fetch screen background from database

I was trying to create a setting for custom screen background. So, I saved the chosen picture (in a url form I guess) in the DB. In the screen.intialize, the screen background is set to the fetch value from the DB. But the screen background is not appearing. But with the uploaded images (in the AI2 web app), the background words.  Is there a way to use a url stored DB or non-uploaded image as a screen background?

Note: There are also labels, buttons, and other content on the foreground so using a canvas is not an option.

How about:

set Screen1.BackgroundImage   to     MyFavoriteImage.png  ?

You can save the image in the Media (resources)  or download the image from a web page.

How to save an image into the Media is described in the tutorials: http://appinventor.mit.edu/explore/ai2/hellopurr.html

This describes how to use a WebViewer to grab an url :    http://www.appinventor.org/Chapter24 .   You should also be able to grab a specific image from a web page by using the Web component

Is this what you wanted to know Arielle?     or something else?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Steve, the Media storage (in AI2 web app) for images is pre-defined. I wanted for the user of the app to be able to customize the background of the screen by selecting an image from the gallery via image picker and store it in the DB (I think it is stored in the local url format). Later on, the user may update the background image as he/she wants and this will just update the DB entry.

Taifun, I attached an image. Hope it helps.

use Do it to find out, if the path to the image is correct

Unfortunately, even adding a "file://" before the url string doesn't work to make it the screen's background image.

probably your issue is, you forgot to set screen background color to none?

Thanks a lot Taifun! That worked! I didn't know that the background colour is "above" the background image.

TinyDB with coursework

So I'm making a computer reservation system for my coursework but I've run into a problem. I've made it so that a label changes value +1 or -1 when book or cancel is clicked and set that up with tinydb so it stores the value but I read that you must complete this for 8 rooms. My code consists of code like this http://gyazo.com/f38b677a2d23ef1e0aaa2cb8065c96f7 but as you can see, that only works for the room ICT. I need to get it so that when I'm on this screen http://gyazo.com/deddf1ad2ca25b5278a3cc1a21f93040 and I click one of the rooms it loads up the specific tag (They must all link to the same exact screen though (Booking_Screen). Is it possible? Is there a way I can make it so that a specific button on another screen will replace all text values (Block editor ones) with ENGLISH instead of ICT so it loads the computers that are available in that specific room?

I'm not going to seach and click on links to see your blocks.

Use the Snipping Tool in Windows 7 or 8 (I don't know what you're using because you didn't take the time to choose those categories either), save the snips to your computer, and then post them here as screenshots so we can see what you're doing.

For using the computer map, I would use a Canvas with that map of the computers set as the background image.   Find the Canvas coordinates of the hot spots and use them to identify the room/computer station.  When a boundary is met, it will point to the workstation.  There is  logic code in  http://www.appinventor.org/Chapter18           that discusses programming complex conditions ...it shows an example using latitude/longitude and defining boundaries...the same reasoning will work with Canvas coordinates to define a boundary or hot spot

A second way would be to use the Canvas map backgrount, then put a sprite on each of the stations and using the Touched parameter of the sprite to identify the work station.

Try some blocks.   Are you programming in App Inventor Classic?     You should be programming in App Inventor 2; support for AI Classic is scheduled to stop soon according to MIT.

the problem: screen i ListView in one screen1 (no items screen1)

I have a problem. Screen1 contains various buttons and graphics,among other things, the list button (listview). I want one screen1 open the list (listview) so that when you click an item from a list of all the elements screen1 were not visible (to appear description of the itemlist). PLEASE HELP

This demo shows how to use both the IF statements and Lists to populate and use the ListView component to select and display items or text.

Does that work?

I'll try

Use data and procedures for different screens

If I program an multi-screen app, I would like to use some variables and some procedures in the blocks of all screens. This seems to be impossible. What a shame. The only way to interchange data between different screens is the TinyDB, I suppose. Do you know any other method ?
It would be usefull as well to use the same procedures in different screens, but I not even can copy them. If the procedure is very complex, it is very much work to make it twice.

you have to take the system with its advantages and disadvantages as it is

instead of using multiple screens, you can always use screen arrangements as fake screens, just set their visibility to false or true as needed. This helps to reduce redundancy.

to pass values from one screen to another, you can use TinyDB or pass them in the open another screen with value block. The value can also be something complex like a list or list of lists

....pass them in the open another screen with value block

This sounds interesting. How can I do that. I haven't found this possibility. 

may I introduce you to the documentation?

open another screen with start value

Opens another screen and passes a value to it.

Oh. Thank you very much.

Getting started with an educational app

I learned recently how to do some aplications in app inventor and now i want to do an educational app for kids.
My idea is put some images and some possibles answers with buttons, but i want that all the options can show it randomly.
I want to put a seconds count too
Some ideas?

this might help 

A Multiple Choice Quiz: How to work with the advanced features

Thanks Taifun it helped me :) 

Problem getting the images of AI2 app displayed on Android

I have developed an android app using MIT AI2 (latest build).
When I make the .apk file and install it on the Android device, the images don't show up.
Wondering if any one can help in the right direction.
Our image has the size 240x320 and as 120 dpi as suggested by Android (4.4). It was created by Photoshop and saved as png.
Any help is appreciated.

Make sure the background color of the screen is set to "none"...

Thank you Enis! That was it!

lists and persistent data

Ive been stuck on how to do this for months, just have skipped over this functionality for now.

Have a timesheet app for my employees.  Need to save date, employee name, job, clock in time and out time and total time worked.  I have all these calculations working and saving to tinywebdb 5\ally enter this info.  Also, client app need to utilize this information both in and out.

There is a manager app to do administration  and a client app to actually enter the info automatically.

Again, the client app currently does work just not to include the functionality needed above.

Have you thought of using fusion tables instead of a tinyWebdb? Tutorial: http://appinventor.mit.edu/explore/ai2/pizzaparty.html
And, it is not clear at all to me how your two apps communicate. Maybe you could post some screenshots of blocks that explain this.

Its like make quiz take quiz.  I thought of fusion tables, just havent been able to find good easy explanations.  Would i have one table for each person?

Think of a fusion table as a spreadsheet. Do the pizza party tutorial!
Would you have a separate sheet for each employee? Then yes. But this is really inconvenient if you have many employees and often have new employees or leaving ones. Probably you want one table with columns for name, date,  start time, end time etc.
The question is also, what you want to do with the information. Pay according to hours worked? Find out how many vacation days an employee still has?

I would want to import data based on each name AND date.  So isit possible to do this? To import rows based on two criteria from two columns?  Basically, i dont want to import all info from one name as this will give all data stored for that name, or from one date, as potentially could have data from all names.

Import what from where to where??
From the client phones into the fusion tables??
I would assume that in the fusion table you would have all data for all dates and all names. One row in the table per name for a specific date.
I would assume too, that each client phone would have data for one specific name. The client phone could then periodically upload its data into the fusion table.
Then, with your administrator app, you could do queries to find out for each name how much he has worked on a specific day, in a week, or whatever. You can also find out who has worked on a specific day, or hour, or whatever. Lots of possibilities, but I have no clue what you really want to do with your data for what purpose.

This said, fusion tables is not easy to start with if you have no knowledge about databases, so you would need to do some studying.

What i meant was aquery based on two columms data to filter the rest of the data in the rows.

Filter#1 = name
filter#2 = date

Returns all data for those filters.
Can this be done?

If name=..... and date=.....then return data


SELECT * FROM <tableid>
WHERE date = <selected date> AND 'employee name' = <selected employee name>

first do the Pizza Party tutorial to learn how to work with fusiontables

I've lost my projects is there any way to get them back

I've lost all my projects which I need for coursework and I really need them back. Is there any way to do this?

You say you lost ALL of your projects?  Could you have signed in with a different address?

No I've stayed on the same PC all the time I've been using app inventor.

So, they were there one day and the next, completely gone?  How many projects did you lose and what are their names please?


I heard there is a 3rd party emulator that can be used which is more stable than what we have. Has anyone used such a thing.?

See my tips below and look for the Emulator... it'll show you how to get Genymotion's emulators.

For our App Inventor Tips, visit TwoDogApps.com

help me please

i want to add favorite button. How will i do?

AI2 free online eBook   http://appinventor.mit.edu/explore/ai2/tutorials.html   ... the links are at the bottom of the Web page.

i want to add favourite button.
what exactly does that mean? can you elaborate?

fusion table prompt question

Have a question I have not seen anyone ask about fusion tables. Just went through the pizza example all is good. But When you send a query you get a prompt saying connection to fusion tables with a spinning circle. This is not in the code, is there a way to get rid of it? I do not want anyone to know i am using fusion tables, Really do not need users looking up the table on their own.

 you get a prompt saying connection to fusion tables with a spinning circle. This is not in the code, is there a way to get rid of it?
yes you can, but you have to use the web component together with OAuth instead
see here 

fusionDB: Using Fusiontables Fusiontables with App Inventor as a Database

blocks for screen1 will not be saved

Did I just lose all my work?  I spent a lot of time on this app!  Can anyone help me?  It says blocks for screen1 will not be saved!

I've attached a screenshot.  I've attached the aia file.

Here is data from the bug report.

notes = Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36
foundIn = nb138
faultData = com.google.gwt.core.client.JavaScriptException: (AssertionError)  messagePattern: Assertion failed:  Uninitialized block cannot be renderedDown.  Call block.initSvg() constructor: function (a,b){b.unshift(a);goog.debug.Error.call(this,goog.string.subs.apply(null,b));b.shift();this.messagePattern=a}: Assertion failed:  Uninitialized block cannot be renderedDown.  Call block.initSvg()
projectId = 5108635865710592


only the last changes since the last automatic save will not be saved
just close our browser, reopen and open your project...
btw. make sure to backup frequently and save an aia file on your computer
I've tried that.  I may have saved over that option accidentally.  I know what block I was working on when it happened, but now it won't let me delete the block and save the project or export the aia.
I just tried to upload your aia file and get the same message "An internal error occurred"

notes = Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36

foundIn = nb138

faultData = com.google.gwt.core.client.JavaScriptException: (AssertionError)  messagePattern: Assertion failed:  Uninitialized block cannot be renderedDown.  Call block.initSvg() constructor: function (a,b){b.unshift(a);goog.debug.Error.call(this,goog.string.subs.apply(null,b));b.shift();this.messagePattern=a}: Assertion failed:  Uninitialized block cannot be renderedDown.  Call block.initSvg()
projectId = 6271620868997120
just load your latest backup and restart from there.
Is there no way to exit the aia file directly?  

Texting and AI2?

I'm doing projects with my 9th grade class and thinking how great it would be if we could do some sort of texting -- as in send a text to a phone as a reminder, etc.

I do notice that we can use Google Voice, but my understanding is that service is going to be discontinued shortly by Google. We are using Samsung Tabs. Since they're not phones, perhaps this is not even possible with the hardware, but I'd love to hear what others think.

I do notice that we can use Google Voice, but my understanding is that service is going to be discontinued shortly by Google.
do you have a link for that announcement?

you could use the texting component, but this is only possible with handheld devices

alternatively sending emails is simple using the Activity Starter or the Sharing component or try Twitter

some snippets:

I believe too that the device must have a phone number to text, so unless the devices are phablets, it's unlikely texting will work.

Need help arranging fusion table

Hi, could someone help me with fusion table. I have this questionare that, upon submision, the results should be put up on fusion table. For each question, an answer is adjusted by a slider. The slider is set up from0-100.There are a total of twenty questions.  How can this info be relayed to fusiontable so that i can retrieve the data?
Thank You

then try something and if you get stuck, see here

App inventor 2 blank screen

Hello, I've made a simple app but it shows blank screen when i download it on a phone, and after few seconds an error shows up and the app crushes. I've already make two apps and this never happen to me. I've deleted everything in "blocks" option and still there is a blank screen. This picture might help.http://prntscr.com/56ch84. If you know whats wrong please answer. 

I see a bunch of vertical arrangements, which I assume you
are making visible only one at a time, to save on inter-screen logic.

Is screen1 unscrollable at packaging time?

Is only your initial vertical arrangement visible 
at packaging time?

Yes, only one vertical arrangement is visible, and the scrollable option is on and only the initial vertical arrangement is visible. Basically, the app is about my city. There will be 3-4 seperated options. History ones, modern city, hotels, restaurants, etc. So in every of these options there will be aprox. 10-14 in each of them, so i need like 60 vert. arr. if there are 4 options. For example different hotels in a city, each hotel each vertical arrangement.

So in every of these options there will be aprox. 10-14 in each of them, so i need like 60 vert. arr. if there are 4 options

let me recommend to create one template for each option, i.e. 4 vertical screen arrangements with image, label, button etc what you need. Then store the data in lists and replace the information inside programmatically for each item to display

So you think the number of arrangements is the problem and i should just make one for one option and put "if - button click - image picture to" and same with label "label text to" so it will change the image and text as i write on blocks? And do you think that i can put around 80-100 pictures that are aprox. 60kb size = 4.8mb - 6mb?

yes, you should avoid redundancy
and concerning the pictures, there is a limit of 5 MB for App Inventor apps
there are these workarounds: https://puravidaapps.com/filebyfile.php
see especially Hossein's workaround

Thank you a lot, can you view these pictures and if you could just tell me if I'm doing this good. In the first picture you can see buttonshttp://prntscr.com/56e2kh. And in the second you can see how you told me to avoid making arrangements http://prntscr.com/56e28j. Ill try to do the same with buttons if that's possible to avoid making many of them too.

this is very cumbersome, there is a lot of redundancy, you should work with lists!
as already said, see here  Building apps with many screensand How to work with Lists by Saj

I recommend you to first do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor and follow the


so, ive been struggling at this app for a long time now, and i was wondering whether anyone would be up to the challenge of making it? we would then compare the apps (so send me the aia file)!?

1) Create and store a list of names and numbers to use when developing your app. For testing purposes a list of approximately six names and numbers is enough.
2) Develop the part of the app that allows the party organiser to enter and store the details of a new party. The details needed for a new party are:
• a title for the party (eg ‘End of Term Party’)
• the date of the party
• the start time of the party
• the location of the party (eg ‘School Hall’).
The app should check that all the details about the party have been entered (ie have not been left blank).
3) Develop the part of the app that allows the party organiser to invite people to a party. You should use the list of names and numbers that you set up in Task 1.
• The app should set up a text message that contains the text ‘You are invited to a party!’, and the title, date, time and location of the party.
• The app should then send the text message to all of the numbers on the list.
• The app should then set the status of each person, who has been sent the text message, to ‘invited’.
4) Develop the part of the app that allows the party organiser to keep track of who has confirmed that they will be attending a party.
• Display the names and status of the invited people.
• The app should allow the party organiser to update the status of each person to either ‘attending’ or ‘not attending’.
• The app should also allow the party organiser to change the status of a person back to ‘invited’.
5) Develop the app so that the party organiser can change the details of the party and a text message will be sent to all the people whose status is either ‘invited’ or ‘attending’ informing them of the new party details.
6) Develop the app so that the party organiser can delete all details of the current party and start a new party.

I can help you with your app. I charge 25 USD per hour and I think, I could do it in 8-10 hours, which is 200 USD - 250 USD.

In case you are interested, please transfer 100 USD as deposit via Paypal to taifunbaer@gmail.com

Jack... is this a school project?

Kind of - i've pretty much done most of it, but im struggling it all! I've  already done prototypes and everything. It's not to be handed in, so this isn't a bad use or anything - its sort of a dummy app to make.

Could you help? :)

I'm pretty much done - so im not tooooo bothered if anyon helps or not :) ty anywyayyayaay

What are you struggling with?  Post screenshots of your blocks with a description of the problem and maybe we can help you out.