2014년 12월 12일 금요일

APK, hay fallo de imágenes. (APK, no fault of images.)

Yesterday and today I have also had failures to load the project, with images of the same. After generating the APK bugs happen. Is it a fad or have a problem?

There failure to store the APK to my computer too.

there seems to be an issue with the build server currently?
as workaround I can offer to try one of the personal servers and build your app on your own computer...

This appears to be some kind of Google problem. Most of your assets may have"disappeared" from Google's Cloud store. Because your project still thinks they were there, internal errors may be  happening.

Something you could do, is remove all your images (the missing ones) from your Media (resources) for this project.  You should upload them again (presumably you have the original images) and things should then work again.

cargo de nuevo las imágenes fallidas y me desaparecen otras

OK, I understand you are still having issues.   At the moment, two of the eight servers are at very near capacity.  There are MANY people using AI2 today; that may be part of the issue. 2:48 pm UTC     .    This is probably a temporary problem.    Please be patient.     

The MIT Technical Team has been advised there is a problem.

For the moment, I suggest you just do nothing until you see a post from the team and they can do something about the problem.

There is VERY high server usage at the moment.

Parse Error

I completed the TalktoMe app and successfully downloaded the .apk to a Nexus 7 tablet after changing the Security settings to allow non Play Store apps.

I tried to do the same thing on another Nexus 7 tablet and received a Parse Error There was a problem parsing the package message.

The successful download tablet is running KitKat and running off the hidden district network. The problem tablet is running lollipop off a different school wireless network.

Any ideas on what I need to do?

Does the lollipop device have TTS Extended Service?

In order for this component to work, the device must have the TTS Extended Service app by Eyes-Free Project installed. You can download this from http://code.google.com/p/eyes-free/downloads/list        

Another possibility is that the device is out of memory...perhaps the devices has very many apps loaded and it is using up all the memory and there is insufficient memory to allow the  TalktoMe app to load.

Make sure TTS is available, then see what the memory usage is using the Android Settings (on the device) to see if memory is at or very near maximum capacity.

Save an image list to phone's sd-card or memory

I'd like to send an image list from my app to my phone's sd-card  or memory. Use it temporarily for a remote database and then retrieve it at some point. Is this possible? Charles

just try something and if you get stuck, post a screenshot of your relevant blocks

How to add a intro animation to my app ?

I am creating an application for my school project and I would like to add an intro animation to the application. Could anyone tell me how do I do that ? 

Sorry if this issue has already been raised .. Could you then give the link for the previous post ?

Thanking everyone in advance ...


A lot of programs use their opening animations to 
flash helpful tips to their users, while loading 
files in the background.

Is the rest of your app developed enough to
need to load files when it opens?

Actually, I am a newbie here and I have created a simple text and button based app. I do not need the animation during loading some files. My app loads fast enough, I need to add the video before the app (1st screen appears) begins to show everyone a small video about our school ...

Thank you for the link but I was actually looking for a way to add a video in my app ..

The video player is described here   http://ai2.appinventor.mit.edu/reference/components/media.html#VideoPlayer

What you want is to play a video, not an animation..an animation was described earlier in the post, another thing that could be used is using an animated gif image in conjunction with a Web Viewer.  An animated gif can be made using tools on your PC to create a very short "video" like presentation if all you need is a few seconds worth.

What you want is the video player.

Make Text Block

Progressing slowly but still having problems with the conversion from Classic to Inventor 2.

What is the Inventor 2 block which replaces the Classic MAKE TEXT BLOCK, currently dong the Business card app.

What might help is if someone could post the Block code for theBUSINESS CARD app as derived for the App Inventor 2 which I could use as a Rosetta stone to put me on the right road.  

Make Text is in AI2 Text -> Join block

The "Business Card" app is part of a third-party for profit course that users have to buy.  I suggest you contact the publisher of that course.

In the meantime

AI to AI2 conversion

To convert AI Classic blocks to App Inventor 2 blocks, the document mentioned below outlines some of the differences between AI Classic and AI2:

This link talks about differences and the new stuff in AI2  http://appinventor.mit.edu/explore/ai2/whats-new.html  

These documents will help you convert an AI to AI2.

My experience is it is frequently better to ignore ALL the blocks in old AI Classic tutorials and build the app using the tools in App Inventor 2.  Read what the app is supposed to do, then just start building an AI2 app to do those things.   WHY?   Many of the AI2 tools are very different than the tools in AI Classic and most of the tools are 'better' in that the similar tools in AI2 have more capability, there are more tool options to do things that were done in AI Classic in 'better' ways using AI2.     Of course, if you have to, the advice above may help you 'convert.'  The AI2 free online eBook   http://www.appinventor.org/book2... the links are at the bottom of the Web page teaches you to program AI2 blocks (and is FREE online).

The AI2 controls are discussed here:

[App Inventor Open Source Development] Creating a new component, should I rebuild whenever I make changes?

I'm trying to create a new component for AI2 and I'm wondering if I should rebuild the whole application whenever I commit some changes to my code.

Also, If I'm going to make some changes in the appengine UI, what should I do to see these changes? Should I rebuild? I read from the GWT Docs that this is unnecessary.

Thank you in advance!

if you are only making changes to the component internals (not
changing any block signature), then you simply have to rebuild the
component and create a new Companion app. The target 'ant comps' will
do all this for you if you have your phone connected through a USB

If you are making any changes that affect the UI (changing the name of
a block, or the parameters, or creating a new block), then you will
need a full rebuild (simply type 'ant').

Note that the changes are almost always needed in the companion, so
you will have to install it manually if you don't use one of the
targets that pushes it automatically to the phone.

Also note that since the internationalisation code was added, some
extra work is needed to create new components; the instructions are in
YaVersion.java :

Insert Row into Fusion Table using fusiontablecontrols.insertrow

I am trying to insert a row into a fusion table using the fusiontablescontrol.insertrow command.

when it executes in my app I get the swirling fusion table icon on the screen but nothing appears in my fusion table.

i have set my fusion table up in exact same way as I have used for another table which I read from and this works fine.

attached a couple of screenshots of the code:

see the documentation http://ai2.appinventor.mit.edu/reference/components/storage.html#FusionTablesControl

InsertRow(text tableId, text columns, text values)
Inserts a row into the specified fusion table. The tableId field is the id of thefusion table. The columns is a comma-separated list of the columns to insert values into. The values field specifies what values to insert into each column.

let me recommend to put together the INSERT statement as described in the Pizza Party tutorial. That's much easier to debug. IMHO the new blocks do not help very much, they just add more confusion...

Thanks for the advice Taifun.

I took my query from the insertrow command and put it into a fusiontablecontrol.query (as per Taifun's pizza party tutorial) and it worked straight away. suspect that the new insertrow block does not work properly. Has anyone else managed to use it? I have not seen any examples of it use when searching.

Error: blocks workspace is empty

* I got this Error saying "Error: blocks workspace is empty " and if I want to save blank screen. I said no. When App was built -- I am missing some image, media etc. App size is (aia) 3.8 MB

* I had a back-up file from Sunday, when I loaded that backfile it also gave me the same error and same missing files (files are different  but same error). I am 100% sure that I downloaded this file and afterthat built app from this version without any error?

On Sunday APK size was 5.7 MB and Today it is 5.4 MB. Do anyone know how to resolve this. 

Also right now, last 3 time I built app the sizes are different by ~100-300 KBs, is that normal.

Please help

I have the same problem , the size of the app is less than 5mb. I am missing images, after the build. And the same Error frome time to time ...

AI2 Progress Bar

Build an AI2 Progress Bar

AI 2 does not have a progress bar.  In other programming languages, a moving line display is usually called a Progress Bar and is a standard control; AI2 has no Progress Bar tool.

When a compiler does not have a specific tool, it is frequently possible to “build” one using the components in the compiler.  This Progress Bar tip demonstrates three ways to  build and use a ‘progress bar.’  There are certainly other ways a developer can do something similar. There is very little explanation.  If you understand basic coding you will have no issues

Three Progress Bar examples shown on one Project app:

Use a timer, set the width of the progress bar to the Screen1.Width and allow the timer determine the bar’s progress.   The top example uses the red bar and is time driven.

Place a Button on your screen (Button1).  Set the text of the button to nothing.
Make the button VERY thin, set Button.Height to 10.
Make the Button.Width to 1.
Set the Button.BackGroundColor to red.
With a clock.timer     set the timeinterval = 600 ms (just less than a second).   You set this interval to anything you want.  600 ms provides animation of the progress bar in real time.

Put the following into the clock event handler:
While Button.Width < 320 do     (320 is the width of the screen in this instance) or as shown in the example, set < Screen1.Width
set Button.Width to Button.Width + 1

or something similar.  What you do with this in your app is up to you  Every time the clock ‘fires,’ the button advances.  The label records the pixel ‘number’ (or expressed another way, width of the ‘bar’ in pixels.    Note, you also need the Screen1.Initialize blocks shown below.

The following two images show the bar building up  and completed.  The numbers are the number of pixels so far traversed (from 1 to x) and will stop at the limit of the screen.   In this case, when 320 is reached, the line is at 100%.  START/STOP  starts and pauses the bar progress.  The red line is actually Button1 in disguise.


The second example is event driven.  Three buttons demonstrate a project’s progress.  Button4 is the #1 button.  The third button (Button6) tests for a Boolean event to be true before it allows progress to be displayed.  (check the check button in the app to set the event to true).  The display Button7 is the blue bar.  The length of the blue bar is set by a global variable ProgressBarWidth, as shown in the blocks. Here it is set to 50.

The last example is also timer driven.  This is the first example using a Progress Bar that does not occupy the entire screen. It uses a separate Clock component (to avoid confusion with respect to the first example)..  The bar here is green (it is Button9).  The green line is Button9.  Button8 is the Start 2 button; it enables Clock2

The following blocks go in the Screen.Initialize .. where you place them in your app is up to you.

There are many other ways to display progress of an event.  A developer can trigger a segment of progress based on the system clock; the percent of activity between two time intervals (where one represents start and the other stop); on a game score (as the score increases, so does the line).

The Reset button is common to all three examples.
The Screen1.Initialize event handler contains instructions for all three examples. Your project will not need all the extra code.
The width of the green Progress Bar is set using the global ProgressBarWidth and set initially to 50.

Please do post other ways of doing this.  In app development, there are frequently many ways to accomplish a goal and developers can do lots of things with AI2.

Sorry to ask, but i'm having some trouble with the first step :-(   can you please show me what you mean with:  It's probably really basic
Put the following into the clock event handler:
While Button.Width < 320 do     (320 is the width of the screen in this instance) or as shown in the example, set < Screen1.Width
set Button.Width to Button.Width + 1

The text means what it says ..the example assumes the screen width is 320 pixels, so the button, when showing an operation complete has to reach 320 pixels width.  As you recall, the button is (sans text and made a pretty color) is used as the display bar.  " Or something similar"... well, if your screen is wider, you might want to assume the screen width is say 480 pixels and make appropriate adjustments...in that case, 320 pixels is not appropriate; or instead of hard coding the width of the screen, code   Screen.Width instead..it is up to the developer to decide what he wants to do with this stuff.   There are several examples showing directionally how the code could be used with slightly different 'progress bar' configurations.   

Code the example project, run the Project and you will probably understand as you watch how the screen changes depending on input.

Ok, i will run the code, probably overthinking something :-) that is allready in the code

One bar I noticed wasn't mentioned was a an indefinite loading bar for when you don't know how far along something is.  This design I made will keep looping until stopped and doesn't need to know how far along to be.

Indefinite Progress Bar
For the progress bar itself, set up a horizontal arrangement set to fill the whole screen, and then put 10 (or number of choice) labels in it with a height of about 10 pixels and a width set to about 32 pixels.  Then change all their text colors to 'None', and then change the background colors to a repeating pattern (at least 3 colors is needed to give the user the perception of movement) as shown below.  Also add a timer with a small interval (like 333ms).

Once you have done so, go to the blocks editor and set up the following.  Note:  The collapsed list under the Clock1.Timer block is the same list as the one under the Screen1.Initialize block.

The way this works:  The initialize block chunk sets all the labels in the horizontal arrangement to the width of the screen divided by the number of labels (NOTE, in the math block, change the number 10 to however many labels you put in the loading bar).  Then, each time the clock timer (which you can start/stop by an event of your choice) triggers, it will change each of the labels in the bar of color 1 (light grey) to color 2 (gray), all of the labels of color 2 to color 3 (dark gray) to color 1.  You can modify/add/remove colors to suit your wishes, just make sure that you have an 'If then else' block set up to read the color and change it to the next one (just keep in mind that if you use less than 3 colors the person will not be able to detect motion, it will just look like it's flashing).  When the event is complete, you can set it up to stop the timer and hide the entire horizontal arrangement all at once.
The result will be a bar of colors that looks like it's moving from one side to the other.


very nice Justin, great solution!


Informazioni app inventor 1 o 2 (Information app inventor 1 or 2)

I'm trying to create an application to control a relay sheda via ethernet that has an integrated server.
the board is accessible from the web by logging into your ip address I get the index page in htm with various buttons that change color if I turn on or turn off a relay.
What I can not see how to program is the relay status of app inventor, more when the web, for example, the active relay 1, even on the phone I would like to see
relay 1 active. perhaps adding an icon of a light bulb on or off.
Someone can help me?

Not showing past projects

My past projects are not showing under "My Projects". Any advice?

A red bar with black text says "Server error: could not retrieve project information. Please try again later!"

I have been getting this message for the past 4 weeks.

Are you logging in with the same ID that you created the Projects with?     If you have several log in IDs, perhaps you are using the wrong one.

You have been getting this message for several weeks.   Have you ever in that time been able to find your projects or you never have been able to get your projects?  Are you having problems with all projects or just some?    If some, what is are the names of those projects?

Be aware, App Inventor Classic support will disappear shortly according to the MIT Development Team; when exactly has not been announced.  The last anouncement indicated during Fall 2014.  So it is imperative you convert your AI Classic projects that you want to continue to develop to AI2 as soon as possible.

If you have multiple log-ins, try a different on and let us know what happens.  If not, answer the other question and someone will try to find out why you are not connecting.

I double checked which login I was using, so that is not the issue.

In the past, they would eventually load (maybe 5 minutes later). However, the past few weeks they haven't loaded at all. I saw that announcement which is why the past month I have been trying to access them before App Inventor Classic is dismantled. 

do your App Inventor Classic projects show up here http://beta.appinventor.mit.edu/?


OK, so you have different accounts and neither work.  Is the account you think is the correct account tied to the Google account you are tryng to log into.  In order for MIT to determine what might be wrong with your projects, they will need to know.   Yes, or No?

Do you know the names of some of the Projects in your account?    Knowing them might help someone to establish what is wrong.

The site you should be using to find your AI Classic blocks is here:  http://appinventor.mit.edu/explore/classic.html    Can you confirm that is where you are looking for your Projects please.

What kind of Internet connection do you have?      You said "In the past, they would eventually load (maybe 5-10 minutes later). However, the past few weeks they haven't loaded at all. "    Those are extremely slow connection speeds.  Do you have a DSL connection, cable or dial-up ...and do you know your Internet download speed?   A service like this  http://www.geeksquad.com/do-it-yourself/tools/test-your-broadband-speed.aspx  may help you to determine that.

I haven't had any issues with my other account.

This google account - SchaefferResearch - is the account with which I am having issues. 

Yes, that is the site I am using. The projects under "My Projects" will not load.

There are many projects- the names are variations along the lines of: 
"A1001_Prac" "A1002Prac" "A1003Prac" "B2001_Prac" 
and "A1021_As2" "B2023_As2" "C3030_As2" etc. 

Originally, they loaded instantly. In October, they started having issues loading, but would eventually appear after 5-10 minutes.
The connection is not the issue- I just tested my speed using the geeksquad site and my DL speed is 38.66 Mbps, UL speed 2.36 Mbps.

OK thanks ... connection speed frequently is the issue.   Be patient, the guy that looks at such things is busy on a huge project.... he will eventually look at this so watch the posts here ... be aware, if he does not get to your issue, the weekend is upon us.   Thanks for the additional info.

Be aware, it may not be possible to recover your project(s) ... someone will look.  You might have to back up with saved source files if you have them.

A last question, can you presently start and load a NEW project ?   Just to make sure the account is still 'livel.

Yes, I can create new ones. However, if I close the page and then open the page, I cannot access the project any longer. It disappears, along with all the previous projects.

Try disabling ALL of your add-ons and plug -ins...

If you create a project, close the browser, open the browser and the project's gone, it's definitely on your end.

Have you tried Chrome instead of Firefox to see if you can get to your projects?

If I log in with another account, my projects with the other account are all there. However, when I am logged in with SchaefferResearch@gmail, the projects will not show up.

I disabled my add-ons and plug-ins. This did not fix the issue.

I experience the same issue and error message "Server error: could not retrieve project information. lease try again later!" in both chrome and firefox. I have tried 8 other computers (both Macs and PCs) and get the same error message every time.

Hi. I'm one of the MIT App Inventor maintainers. I just checked and you have 478 projects registered. I suspect that you have hit a fundamental limit in how many projects you can have. App Inventor is hosted on the Google App Engine platform. App Engine requires that all requests be processed within 60 seconds. I suspect it is taking App Engine more then 60 seconds to enumerate your projects. I'm not sure what we can do about that, except remove some projects.

Are there some (hopefully small number of) projects that you require. I can manually extract them from the system and give you the appropriate zip file. You can then upload them under another account.

Is there anyway I can get all of them? They are a crucial part of my master's thesis. Or somehow make them available to me for a limited amount of time (1 day would be all I would need) so I can go in and screenshot the information I need from each one? 

Don't you have AIA files (AI2) or ZIP (AI Classic) backup files of your work, or at least most of it???

If not, I'm astonished that you're trusting ALL of the work you did on your thesis to the cloud.  That's not very protective of your work, and you're exercising an ENORMOUS amount of trust in things you can't control.

It would be a HUGE job for Jeff to extract all 478 projects... which ones are you missing for which you have no backup?

My local backup was destroyed at the beginning of November. I was in the process of making new local files when the program stopped loading the projects. 

I need all of the files which have the phrase "Prac" or "As2" in them. 

I understand that this is still a lot of projects (around 280). If there is anyway the program could support the projects (even a 24 hour window), I could get all the information I need.

You don't seem to understand... It's not MIT that locked you out, but it's a timing issue because you have too many.  That's out of MIT's hands as it's the Google App Engine that has to load them all, and apparently, due to the sheer volume of them, the server can't keep up.

We'll see what we can do, but be advised that if a solution is worked out, you'll have to act fast... That means checking your email constantly and coming back to the forum several times a day to check.

I'll see what I can do. Basically I'll have to write some dedicated code to go into the Google Data Store and extract the projects in such a way as to not trigger the timeout.

I'll start work on that tonight. Hopefully it shouldn't take me more then a day or so.

Thanks, Jeff.

I was able to recover 459 projects. I have placed them in a password protected dropbox folder. I will send you the link and password in private email.

Again... magician... excellent Jeff!

[App Inventor Open Source Development] I need some help building appinventor locally on windows 8.0

I am trying to build appinventor locally on my Windows 8 system, because I want to be able to use it offline and hopefully in the future try and help to extend or improve it. For now however I am not even getting started. The ant process starts, but fails with a number of errors that I don't understand. Could you please help me find the issue and hopefully solve it.

The errors that I get are: 
C:\Program Files (x86)\Google\appinventor-sources-master\appinventor\build.xml:16: The following error occurred while executing this line:
C:\Program Files (x86)\Google\appinventor-sources-master\appinventor\build-common.xml:389: The following error occurred while executing this line:
C:\Program Files (x86)\Google\appinventor-sources-master\appinventor\components\build.xml:319: The following error occurred while executing this line:
C:\Program Files (x86)\Google\appinventor-sources-master\appinventor\components\build.xml:214: Compile failed; see the compiler error output for details.

If it is of any use, I also attached the complete output that I got.

My environment:
- java version "1.7.0_71" (32 bit)
  Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
  Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)
- javac 1.7.0_71
- Apache Ant(TM) version 1.9.4 compiled on April 29 2014

I really hope somebody here has the experience and the patience to help me out here.

I believe the issue is with the spaces in your directory structure;
this is the error:

[javac] javac: invalid flag:

If you place the sources in a folder that does not contain spaces
(unlike c:\Program Files (x86)\Google\...) and try again, all should
work fine. Windows + Java can be a bit of a pain at times.

Look who it is again, José. I'm fed up with your shit faggot. The other day when you called me a newfag, yeah, haven't forgotten about that yet. Fuck you I've been on here for months and probably get on here more than you anyways. Don't you know that you make yourself look like a newfag when you call others newfag? Just because you learned how to hack your name and change it to "Jos" does not give you the right to disrespect anyone at any time.

Thank you for your advise. I moved everything to c:\ai\ and ran "ant clean" just to be sure. Subsequently I tried to do the ant-build again. I did seem to get a bit further, but unfortunately not all problems were solved this way. 

Attached is the new output. It seems there is a problem initializing the virtual machine. Could this be a "32-bit Java on a 64-bit system problem"?

that seems to be a memory allocation issue; there's some instructions
in the docs, in section 5
(5. Building and Launching App Inventor (Windows))

Note the following notes:
Users have reported several problems when compiling the system. They
are generally associated with how Windows allocates memory for the
Java heap. Environment variables can help with this process; some
users have reported that creating the following variable makes the
errors go away:


In other cases, Ant options seem to work too:

set ANT_OPTS=-Xms512m -Xmx512m

Hope that helps,

Thank you very much. I got it to successfully build now. I never would have guessed a memory issue.

Damn! I tried several times until today I noticed that in the statement
you have spaces araound the "=". So I guess the environment variable wasn't set properly.

Maybe please correct this to 

set _JAVA_OPTIONS=-Xmx1024M   

in the docs?

good catch! corrected now; thanks for reporting this Joachim.


Re: Location question

if you  don't understand me its because of my english knowlegde i dont' come from england or other english speaking counties

App Inventor can figure out where it is by using the LocationSensor.   If you program the information about Berlin, the app can find what you programmed.  Look at this demonstration called Map Tour   http://www.appinventor.org/Chapter6   , it may contain the information you require. and you can link that to information from the LocationSensor coordinates

You could also use the LocationSensor in conjunction with a Web search.   AI2's ActivityStarter can do a Web search,   search on  LocationSensor.CurrentAddress.
To do the web search, you would do something like this:

Launch a Web search

To launch a Web search for a particular query, such as "Homer Simpson", use an activity starter with these properties:
Action: android.intent.action.WEB_SEARCH 
ExtraKey: query 
ExtraValue: Homer Simpson 
ActivityPackage: com.google.android.providers.enhancedgooglesearch 
ActivityClass: com.google.android.providers.enhancedgooglesearch.Launcher

Where the LocationSensor.CurrentAddress   replaces Homer Simpson

Also you can    also

Show a map for a location

If you know the latitude and a longitude of a location, you can show a map using an activity starter with these properties to show a map of the area:
Action: android.intent.action.VIEW 
DataUri: geo:37.8,-122.23?z=23
The format of the DataURI is specific to the app. In this example, the URI specifies a z (zoom) of 23, which is the largest zoom value. Zoom value is optional and ranges from 1 (the entire Earth) to 23.
If you know the zip code, you can set the activity starter properties as follows:
Action: android.intent.action.VIEW 
DataUri: geo:0,0&q=94043
If you have a street address, you can use a DataUri that encodes the address with a scheme called URL encoding :
Action: android.intent.action.VIEW 
DataUri: geo:0,0&q=5000% 20MacArthurBlvd%20Oakland%2CCA
Generally in URI encoding the only characters you have to replace are space

with the ActivityStarter.

There are other things you can do using the Google Business Maps API  .

What have you tried?