2014년 12월 25일 목요일

Re: Web form report: App inventor don't load my app, says the...

I have that problem too with the same Service, Browser, Connection but a have an Android device with 4.4.2 KitKat and my Operating System is Windows XP. I report the bugs too but there's no answer. And I try to reopen the page but it happen the same. Please, help me too.



You do not provide enough information.  You need to give a better description of your issue.
Are you trying to use App Inventor with WIFI?  with the emulator?   with USB?

Are you using AI Classic   or AI2?

What is the "page" are you trying to re-open?



I tried with WIFI with USB or the Emulator. But that's not the problem related with the development of the application. I use AI2 and And the page I am speaking for is the page of AI2. When I start the AI2, it can't load my last project. First, Firefox shows me dialog to stop a script of the AI2 page. Then it appear approximately 5 dialog boxes of the AI2 for report a bug because it happened a lot of errors loading the last proyect. Next, it appear the welcome dialog. And finally, it appear the menu of my projects but when I click on one of them, it do not open.



OK.   Your project will not load at all.

Some reasons why a Project will not load are listed below.   If your project last ran before Dec 11 but not now, it is possible the problem is related to this issue:  https://docs.google.com/document/d/1wQy_1uCsZDAXY51wElbMyfy8AJid_EOqklIX_ggzBJY/pub   

If not his then one of the following  possibly applies to your code (all may not apply to your code):

1)  You have coding errors in your blocks.  In the Blocks editor, look in the lower 
left corner of the window for the yellow and red triangle icons. If the red icon has a value larger than 0, 
you have a serious coding error.  Find the block in your code that has a red triangle and 
fix it.   Red triangles always inhibit creating an apk or running a project in the 
emulator or possibly creating an aia file.     Yellow triangles are more forgiving, 
however, sometimes, these need to be fixed because they trip an internal warning and not billing puzzle piece sockets are left un-filled.

2) Your source file (the aia file) is larger than the 5Mb limit allowed in AI2 (the aia can not be larger than 5Mb). You may have put images or other resources in your Media (resources) that you do not use in the app. 
 All the images and sounds in resources count toward the 5Mb limit along with the source code.    You can program 
apps larger than 5Mb in the browser, but the apps will not compile and might not run in the 
emulator or the project may not save as an aia. If this is the case you need to reduce 
the size of your image and/or sound files.   Most image files can be made quite small 
by resizing them using a photo manipulation program on your PC to less than 50Kb each.

3)  You might have more than 10 Screens in your app.  AI2 becomes unstable when more 
than ten screens are used.  Projects CAN be built with slightly more screen but then you should expect your app to occasionally behave erratically.

4) You might have set a Screen icon in the Designer Properties for your project that is too large. Use an image 
sizeof 48x48 px or 96x96px instead and only use jpg or png images.  *.ico files are not 
supported.  The 'icon' (actually an image) can be as large as 520x520 (I think that is the size GooglePlay apps require).  The smaller 'icons' work fine otherwise.

5) You did not code the entire project using App Inventor 2.   If you used one of the 
third-party AI2 clones,you might not be able to load a Project into the AI2 compiler or 
create an apk with the standard AI2.

6) If you incorrectly modified the project's Manifest files using a third-party tool, you may have issues.

7)  Sometimes, if you have LOTS of Layouts on a single screen,  the apk might not 
compile. How many is a lot?  I do not know, keep adding layouts and buttons, compile and try again...when the server crashes, you got a lot.

8)  The network you are using may be overloaded (possibly a school network), or you have other applications running in the background on your computer, or your virus checker is doing a scan.  Sometimes, just trying to access the MIT server a few minutes later will give you a more favorable response.

9)  If you have BlueStacks on your home PC (BlueStacks is a special emulator that allows Android apps to run on a PC).  The Google emulator on AI2 cannot run unless BlueStacks is disabled and all of the BlueStacks processes are shut down.  On a Windows PC, you use the Task Manager to 'kill' running processes.

10)  Are you using Sensor controls (except for the clock)?   Most Sensor controls or controls related to sms or the phone do not work in the emulators.  They need to be tested on a device.

11) If this is an issue about the Project loading slowly on your device or on the emulator:  Be aware, the more images, layouts, components you have on a screen, the longer it takes for the emulator and Companion to render the graphical screen.  How fast the emulator renders is partially a function of your hardware...how much ram you have, your cpu clock speed etc. Sometimes, with lots of graphics, the emulator will just give up.   Can you develop live using WIFI or using USB? These options almost always render faster than the emulator but will not be at lightning speed if you have lots of graphics.  Be patient.

12)  This happens too:   We have seen instances where it is probable the Google Cloud messed up; other instances where an older PC has had memory issues and caused file corruption of the Project and instances where a user is using a very slow Internet connection (like dial-up) and it is just too slow.

13)  Do you have an AVG, Eset or AVAST virus checker.  Some versions of these products have been reported inhibit running the emulator unless (in the case of AVG) the Advanced Link settings on the software are set to allow AI2 communication.

Look at the possibilities.  Which do you think might be the issue.   Hopefully you can fix the problem based on the above information.   If you still can not run your project, tell us more and ask again.



No. It don't load. I can't see anything related with the project. The editor don't shows the blocks, nothing. I can't edit the project.



Can you load other AI2 projects?   Or  is this the only project that does not load for you?     It is important for us to know.

What is the name of your Project?



I can't open all the projects I've got. The error was started next doing my protect in Spanish Texto_a_Voz__Especial_Fiestas.



Someone will look at your project account from MIT.  This is holiday time, I do not expect you will get a response here until Monday because the person who does this is certainly having days off.  Be patient and look back here for more information but do not expect any response until Monday at the earliest.   Perhaps you will get lucky.



I could fix the problem. It was that, by the application is very big, the browser couldn't support it. But I tried to open the project with Google Chrome and it opened the project what gives me problems without one of them.


AI2 User Form

Have this working ok:   https://www.youtube.com/watch?v=VOX2rn2Z-oc

I would like to use an input form to load the phone numbers as required. With a button 'new number'.  Is there a add-in form or block Ican use.





sorry, I do not like videos very much, so I did not watch that...
what about using a textbox and a button?

first do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.htmlto learn the basics of App Inventor, then try something and follow the


where is the problem with this sms example?

hi, I'm try out app inventor2, and this is currently an app that I'm testing. the interface look like this. It is a simple app that the user input some text. and key in a phone number which he or she send the text. in other words, it is a sms app.


the block code look like this. when i try to send  a text, it show me run time error. I'm using note 3. and I'm from Singapore, so Google voice don''t work in my country. can anyone able to tell me where is the mistake that i have make. Thanks.



How i can make a configurable button? please i need help!

I need some help to make my app, and to do this i need make a configurable button, if someone can help me, please answer.



What is a 'configurable button?'    What are you trying to do?

To learn how to program with App Inventor blocks you can try:


The AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. teaches how to use the blocks.


How to add records into TinyDB and retrieve them

A very basic question - how do I add multiple records in TinyDB and retrieve them? I am using 'call TinyDB.Store' block to store values, and when I retrieve them using an 'add items to list' block with the list as 'ListPicker.Elements' and item as the 'call TinyDB.GetValue', I only get the last stored record.

Thanks for your help!



Above is how I am storing the data, and below is how I am trying to retrieve the stored data in TinyDB2.




These might help:

=====
Lists



List of Lists
======

TinyDB





Thanks Steve, much appreciate the links.



Hi Steve, just a quick update to let you know that the links were very useful. I now have a reasonably good understanding of lists and TinyDB, or at least enough for me to make my first app to submit to my high school class! Thanks again, Medha.



Great, glad to help.

Merry Christmas,


App Inventor is unable to connect to the Android emulator.

App Inventor is unable to connect to the Android emulator.   alstarter is running.  I see the Emulator mobile (5554:<mobile.>) on the separate screen.  I notice there is WI-FI error on it but I clicked the browser.   it worked.     I noticed there was a message "Problem starting companion app" in alstarter screen.   Can anyone help me?




If the emulator is running, but Firefox cannot connect to it, the most likely cause is that your computer is running software that prevents the browser from making connections.
One of the most common of these is NoScript.   If you are running that, try turning it off.

Also search for NoScript or AVG in this forum, or look here for more hints:

http://appinventor.mit.edu/explore/ai2/connect-help-emulator.html


coding fubu

So i made a coding fubu.....am working on coverting a ai1 app to ai2. Had a working app that i am using, but wanted to make a few changes to it.  Didnt copy and rename the app when i made changes and now i dont remember what the original working app code was.  I have the original ai1 apk. Is there a way to upload the apk to ai1? Next time, ahh next time, i will make a copy....



There is not any way to load the apk to AI Classic. The apk is the compiled app.     You can use an  AI Classic zip source file to load AI Classic but not the apk.



I chock it up as a learning experience then.  Thx


[App Inventor Open Source Development] offline ai2 large media files build still fails:-(

I had this problem on the online ai2:
Build failed! Sorry, can’t package projects larger than 5MB. Yours is 17.75MB. 
and installed the AiLiveComplete on my imac and run it on localhost:8888, but I still get the message?
I thought if I run the ai2 locally, the build size didn´t matter but alas.
It must be possible to build app sizes greater than 5mb!!! ( my app contains  lot of mp3 files, which already are compressed to save space)
Ant help would be greatly appreciated:-)


Please contact the aiLiveComplete forum for questions about their distribution. Thanks.


End phone call with Hash Mark (#)

Hi! I have tried to end a phone call with the # in the end of the phone number line. This is not working, does anyone have an idea to solve this problem?
Have a good Christmas and fine holidays! Cheers.



This forum thread discusses DTMF codes, perhaps a # DTMF played with the Sound component would work?    https://groups.google.com/forum/#!searchin/mitappinventortest/dtmf/mitappinventortest/CDx24Fbo7EA/4hXGAwjITIkJ  

This example can be used to send a tone, that might provide the response you desire.

You want to END a phone call?    Here is a solution that probably can be evoked by AI2 and the ActivityStarter    http://stackoverflow.com/questions/15481524/how-to-programatically-answer-end-a-call-in-android-4-1         but it is untested.    It does not involve sending a # symbol.

Perhaps someone will provide exactly the solution you want?   These two ideas might work.

Merry Christmas,



you could uri encode the # character using the UriEncode block of the web component or just write %23 instead of #



Hi Steve, thank you for your answer! I will try this, thank you so much!!


dummy socket

where i got dummy socket



http://appinventor.mit.edu/explore/ai2/support/blocks/control.html#evaluate

evaluate but ignore result

Provides a "dummy socket" for fitting a block that has a plug on its left into a place where there is no socket, such as one of the sequence of blocks in the do part of a procedure or an if block. The block you fit in will be run, but its returned result will be ignored. This can be useful if you define a procedure that returns a result, but want to call it in a context that does not accept a result.

btw, in case you like to use it to connect with bluetooth, see here how to connect correctly


app crashes when I add long image

I have 2 vertical arrangement (arr1,arr2) with 10 JPG images in each of them
I have 1 additional vertical arrangement with 1 long JPG image (100kb)
blocks board is empty
my apk file size: 3.5 MB

every time when I start the app it crashes "unfortunately <app name> has stopeed"
If I change image in additional vertical arrangement to another smaller image its work partially (somtimes it works and sometime crashes)
I add an attachment




How big is your AIA file?  When you say "When I start the app," does that mean in the emulator or on a device?  Please read my tips below.  Happy Holidays!




my AIA size is 2.6MB
app starts in the device
I know that AIA size is limited to 5 MB so I dont see any reason for the crash
and I dont use blocks because I dont need them right now, I just start to build the app

note: when I remove some images from screen1 (but does not delete them from app inventor) it works good



to find out, why it force closes. you can use logcat, see also
let us know the logcat result...



I get this over and over in logcat: (I tried on the emulator)

12-26 11:12:56.839: D/AppInvHTTPD(244): NanoHTTPD: getPoolSize() = 2
12-26 11:12:56.859: I/global(244): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
12-26 11:12:56.869: I/global(244): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
12-26 11:12:56.869: D/AppInvHTTPD(244): POST '/_values' 

and I had some recoeds in red:

12-26 11:07:18.468: E/ActivityManager(68): ANR in edu.mit.appinventor.aicompanion3 (edu.mit.appinventor.aicompanion3/.Screen1)
12-26 11:07:18.468: E/ActivityManager(68): Reason: keyDispatchingTimedOut
12-26 11:07:18.468: E/ActivityManager(68): Load: 7.79 / 2.04 / 0.69
12-26 11:07:18.468: E/ActivityManager(68): CPU usage from 8428ms to 2295ms ago:
12-26 11:07:18.468: E/ActivityManager(68):   or.aicompanion3: 58% = 48% user + 10% kernel / faults: 3393 minor 109 major
12-26 11:07:18.468: E/ActivityManager(68):   system_server: 17% = 8% user + 9% kernel / faults: 2355 minor 77 major
12-26 11:07:18.468: E/ActivityManager(68):   e.process.gapps: 11% = 5% user + 6% kernel / faults: 1933 minor 35 major
12-26 11:07:18.468: E/ActivityManager(68):   android.protips: 5% = 1% user + 4% kernel / faults: 3074 minor 1 major
12-26 11:07:18.468: E/ActivityManager(68):   m.android.music: 5% = 2% user + 3% kernel / faults: 3103 minor 4 major
12-26 11:07:18.468: E/ActivityManager(68):   app_process: 2% = 1% user + 1% kernel / faults: 536 minor 2 major
12-26 11:07:18.468: E/ActivityManager(68):   d.process.media: 1% = 0% user + 0% kernel / faults: 690 minor 4 major
12-26 11:07:18.468: E/ActivityManager(68):   d.process.acore: 0% = 0% user + 0% kernel / faults: 382 minor 6 major
12-26 11:07:18.468: E/ActivityManager(68):   ndroid.launcher: 0% = 0% user + 0% kernel / faults: 261 minor 8 major
12-26 11:07:18.468: E/ActivityManager(68):   .quicksearchbox: 0% = 0% user + 0% kernel / faults: 343 minor 1 major
12-26 11:07:18.468: E/ActivityManager(68):   com.android.mms: 0% = 0% user + 0% kernel / faults: 302 minor 2 major
12-26 11:07:18.468: E/ActivityManager(68):   adbd: 0% = 0% user + 0% kernel
12-26 11:07:18.468: E/ActivityManager(68):   kswapd0: 0% = 0% user + 0% kernel
12-26 11:07:18.468: E/ActivityManager(68):   mmcqd: 0% = 0% user + 0% kernel
12-26 11:07:18.468: E/ActivityManager(68):   vold: 0% = 0% user + 0% kernel / faults: 53 minor 2 major
12-26 11:07:18.468: E/ActivityManager(68):   m.android.phone: 0% = 0% user + 0% kernel / faults: 202 minor
12-26 11:07:18.468: E/ActivityManager(68):  -vold: 0% = 0% user + 0% kernel
12-26 11:07:18.468: E/ActivityManager(68): TOTAL: 100% = 68% user + 31% kernel



this is your error
ANR in edu.mit.appinventor.aicompanion3 (edu.mit.appinventor.aicompanion3/.Screen1)
Reason: keyDispatchingTimedOut

you can find more information after doing a Google serch

what kind of logic are you using in your screen? any complex task?
which device do you use for your tests?
did you test after building your app with the apk file?



yes I test with apk file on my android device
there is no logic at all (blocks board is empty) I just add 22 images (screenshots) and maximum size of all of them is 2.5MB 



I get runtime error
heap size = 40903kb
allocated =24372kb

what does it means



which device do you use for your tests? most probably an older one?
do you have to display all images at the same time in your app?
probably you can reuse an image component and add some logic to your app?



Your link in your post above regarding the SDK utilities points to an expired webpage.



@Don: it seems to be, Tony's website expired, hopefully his site is up and running again soon!



my device is HTC one V4.1.1
I have 10 image components and I use each one of them to display 3 or 2 different images
but it depends on what button I press , when button is pressed former image is change to the new one (set image1.picture to ...)

do you need more info?



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.



screenshot attached




what you can do is to reduce the image sizes and/or display less images the same time



I must have all images and I succeed to reduce just 200kb and its not enough 
I tried before to upload the image from website link instead to upload the image to app inventor but it takes a long time until picture is display 
(5 sec instead of 1 sec) there is a way to speed it up?


what is error code 2103 on file append?


I try to create a text file on the SD card in my android phone.

I use a "file append" and get back an error code 2103.

what can I do to resolve this problem?

--
refer to: search for error 2103

--


Can't Build Project


When I try to build my app  I get this error:

App Inventor is unable to compile this project. 
The compiler error output was 
___Preparing application icon
___Creating animation xml
___Determining permissions
___Generating manifest file
___Attaching native libraries
___Copying native libraries
___Attaching component assets
___Compiling source files
(compiling appinventor/ai_pietrasantacarlos/closet4/Screen1.yail to appinventor.ai_pietrasantacarlos.closet4.Screen1)
(compiling appinventor/ai_pietrasantacarlos/closet4/CrearCajon.yail to appinventor.ai_pietrasantacarlos.closet4.CrearCajon)
(compiling appinventor/ai_pietrasantacarlos/closet4/EdicionCajon.yail to appinventor.ai_pietrasantacarlos.closet4.EdicionCajon)
(compiling /tmp/runtime7555372886033869911.scm to com.google.youngandroid.runtime)
Kawa compile time: 5.465 seconds
___Invoking DX
YAIL compiler - DX execution failed.
.
Could someone help me please? I've already changed browsers (chrome and firefox)

--
I have 3 screens

--
One of the following  possibly applies to your code (all may not apply to your code).  Best guess is item 1 or 2.

1)  You have coding errors in your blocks.  In the Blocks editor, look in the lower 
left corner of the window for the yellow and red triangle icons. If the red icon has a value larger than 0, 
you have a serious coding error.  Find the block in your code that has a red triangle and 
fix it.   Red triangles always inhibit creating an apk or running a project in the 
emulator or possibly creating an aia file.     Yellow triangles are more forgiving, 
however, sometimes, these need to be fixed because they trip an internal warning and not billing puzzle piece sockets are left un-filled.

2) Your source file (the aia file) is larger than the 5Mb limit allowed in AI2 (the aia can not be larger than 5Mb). You may have put images or other resources in your Media (resources) that you do not use in the app. 
 All the images and sounds in resources count toward the 5Mb limit along with the source code.    You can program 
apps larger than 5Mb in the browser, but the apps will not compile and might not run in the 
emulator or the project may not save as an aia. If this is the case you need to reduce 
the size of your image and/or sound files.   Most image files can be made quite small 
by resizing them using a photo manipulation program on your PC to less than 50Kb each.

3)  You might have more than 10 Screens in your app.  AI2 becomes unstable when more 
than ten screens are used.  Projects CAN be built with slightly more screen but then you should expect your app to occasionally behave erratically.

4) You might have set a Screen icon in the Designer Properties for your project that is too large. Use an image 
sizeof 48x48 px or 96x96px instead and only use jpg or png images.  *.ico files are not 
supported.  The 'icon' (actually an image) can be as large as 520x520 (I think that is the size GooglePlay apps require).  The smaller 'icons' work fine otherwise.

5) You did not code the entire project using App Inventor 2.   If you used one of the 
third-party AI2 clones,you might not be able to load a Project into the AI2 compiler or 
create an apk with the standard AI2.

6) If you incorrectly modified the project's Manifest files using a third-party tool, you may have issues.

7)  Sometimes, if you have LOTS of Layouts on a single screen,  the apk might not 
compile. How many is a lot?  I do not know, keep adding layouts and buttons, compile and try again...when the server crashes, you got a lot.

8)  The network you are using may be overloaded (possibly a school network), or you have other applications running in the background on your computer, or your virus checker is doing a scan.  Sometimes, just trying to access the MIT server a few minutes later will give you a more favorable response.

9)  If you have BlueStacks on your home PC (BlueStacks is a special emulator that allows Android apps to run on a PC).  The Google emulator on AI2 cannot run unless BlueStacks is disabled and all of the BlueStacks processes are shut down.  On a Windows PC, you use the Task Manager to 'kill' running processes.

10)  Are you using Sensor controls (except for the clock)?   Most Sensor controls or controls related to sms or the phone do not work in the emulators.  They need to be tested on a device.

11) If this is an issue about the Project loading slowly on your device or on the emulator:  Be aware, the more images, layouts, components you have on a screen, the longer it takes for the emulator and Companion to render the graphical screen.  How fast the emulator renders is partially a function of your hardware...how much ram you have, your cpu clock speed etc. Sometimes, with lots of graphics, the emulator will just give up.   Can you develop live using WIFI or using USB? These options almost always render faster than the emulator but will not be at lightning speed if you have lots of graphics.  Be patient.

12)  This happens too:   We have seen instances where it is probable the Google Cloud messed up; other instances where an older PC has had memory issues and caused file corruption of the Project and instances where a user is using a very slow Internet connection (like dial-up) and it is just too slow.

13)  Do you have an AVG, Eset or AVAST virus checker.  Some versions of these products have been reported inhibit running the emulator unless (in the case of AVG) the Advanced Link settings on the software are set to allow AI2 communication.

--

set text label on the basis of initial value "get start value"

set text label on the basis of initial value "get start value"

in Screen 1 on click of a button I open the screen 2 passing a value

on "inizialize" the screen 2 I rate the value of "get start value" if it does not contain the text "1" run the first part of the cycle "if" if it contains the string "1" then divide "get start value" in two strings, one on the left and right of the decimal point and the left side to check the label

see attachments screen1 and screen2

but it does not work, what do you wrong?





I have no clue about what you could be doing wrong. My usual way of finding out such a thing is to have a notifier, which tells you what (in this case) the start values are that you receive. Maybe it is not what you expect. You could also put notifiers in the bn_corso1.click, by adding else at two places. Because maybe the else happens and you did not expect it.



use Do it to debug your blocks



I solved was the wrong name in code blocks, was this "video" instead of "video1"


{AppToMarket} Apk signature make display size problem on tablet

I tried to use App To Market and I executed all steps from Key generation by decompile, generating new apk and sign it an all these steps have been succeded...

Then, when I install my application on my tablet, the original size of the screen, shown here :
 
becomes very small as shown there :

Note that the application seems work well despite this micro size... The application needs a very large screen (10 inches min) to be usable. 
Then I tried version 3.2 and 4.0 of the app to market software and some tests with Inventor 1 and 2, and got the same result. I tried to edit the   <supports-screens android: parameter without any success ! 
I'm a bit desapointed ! Is someone to help me to found the good solution ?