2016년 12월 25일 일요일

App Crashing and Losing Progress on App


Our app is currently facing problems. Our app is always crashing after a few min on App Inventor Companion or when downloaded as .apk file. In addition, we lost the recent progress we made on our app

Many people are using the App Inventor Server from our school, so could these two problems be related? We are facing problems at school and home. 

--
1. make sure to switch screens correctly
The recommended method of switching screens in App Inventor

2. follow these recommendations concerning images

-- 
We tried closing our screens, but our app is still crashing...just wondering if this piece of info would be helpful: 23 screens and 56 multimedia files. Would this contribute to the crashing of our app?

Note: We built this app by splitting the screens up into 3 apps, then we merged them together. Our app is VERY complicated, so we had 23 screens...there was no other way to get around it.

-- 
10 screens is the recommended maximum number of screens
you also might want to take a look into avoiding redundancy, see Enis' tips here http://twodogapps.com/?page_id=686#Redundancy and here http://twodogapps.com/?page_id=686#Procedures

-- 
Ok, thanks. Just wondering - is there a max amount of multimedia files we can have?

-- 
no, but there is an app size limit

How to overcome the App Inventor project limit of 10 MB

--

Announcing App Inventor Extension Components


The MIT App Inventor team is delighted to announce the availability of Extension Components for testing. We hope the Extension Components  will prove to be a major enhancement to App Inventor:   Extensions provide a way for anyone to build their own App Inventor components, which others can then use in creating apps.   


App Inventor is free and open software, so people have always been able to build personal systems and install their own components.   But until now, the only way to make those components available to others has been to create and maintain a personal App Inventor server  that has those components built in.


Extension components, in contrast, can be loaded dynamically into any App Inventor system, so they can be shared and imported into projects as needed.   For example, educators and educational software developers to provide extension components tailored to specific lessons and activities, so that students can have these available in building apps.  Examples might be simulations or tools for large-scale data analysis, or image recognition.  Those features might be unfeasible to implement with the built-in App Inventor blocks, either because of processing speed or programming complexity.   But the same capability might be readily implemented using extension components that encapsulate the necessary processing.


Anyone can create extension components. This requires gaining some familiarity with the App Inventor source code (located on Github) and programming in Java.   Once you create an extension component, you can share it with anyone for use in their App Inventor projects.   Extension components can be housed anywhere on the Web.   They need not be stored at MIT or any other special place, although MIT hosts a repository where people can make extension components available for sharing and public use.


Today, we’re releasing a test server for App Inventor that supports the Extension Components feature.   You can find it at extension-test.appinventor.mit.edu.  There’s also a document called App Inventor Extensions that explains how to create and use Extension Components.   Once we've accumulated enough feedback, we'll make extension components a regular part of App Inventor.


With extensions, the range of App Inventor features can be expanded enormously.   We hope that people will explore this tool to build new capabilities for App Inventor and their creations.

--
The implementation of App Inventor Extension Components is the work students who participated with the MIT App Inventor team in through Google Summer of Code: Ethan Hon, Justus Raju, and Mouhamadou Sall.   Other summer GSoC App Inventor participants in 2015 are Devid Farinelli, Yucun Li, and  Shruti Rijhwani.  All of them are extraordinarily talented, and the entire App Inventor community is in their debt.

--
I am realy happy to read this and i am looking forward seeing this in action! For a long time i was hoping to see something simular to wordpress plugins here. I am realy excited :-)
--
I have one question though: why are the extensions limited to non-visible components (like stated in 4.2 of the documentstion)? Doesn't this forbid the development of scrollable arrangents for example? Or html-formatable labels? Or erc...


--
About time... :-)  The whole reason I wrote the Intentsiti helper app was to add capabilities that weren't available in the existing blocks.  Now maybe I can convert those functions into first-class components, and make them available to others.

--
Remember that "non-visible" refers to the designer, not whether or not the component appears on the phone screen.  So you can build anything in the Android SDK -- it just won't appear in the App Inventor designer.
We'll get around to visible components eventually -- but component developers will need to decide how the should appear in the designer screen.

--
Great news.
Would there some central location/repository where people might contribute the extensions or at least information on where the extensions are actually hosted ?
Would it be possible (eventually) for the extensions to be written in Py4A/SL4A as well ? That could lower the bar, or extend the spectrum of potential contributors wider.

--
Reading through the extensions documentation now, brilliant, this will be a game changer,well done folks , much appreciated !

--
Thanks for the nice words.

MIT will be hosting a repository for extensions, after we get more experience.

Extensions are written in Java.  But you ought to be able to run programs Inpy4A/SL4A by creating an appropriate Java interface to call them.
We haven't played with that at MIT, but perhaps someone will contribute such an interface to the repository when it opens.


--
Interesting development and thanks to the students who developed this.
As a note, the App Inventor Extensions web page displays the wrong title ("Uploading Your Apps to Google Play").

--
im hoping there will be an in app billing extension (we know it is possible with AI, as in AILIve)

will anyone be making the in app billing extension soon.

How soon will the feature be part of official ai2?

on the test server you mention can it import converter ai1 files?

--

Is it possible to use Google API and other SDKs / APIs with App Inventor?


I was wondering if there is any way to incorporate Google's APIs into an App Inventor project so we can do in-app purchases, advertising, and access other Google apps like Maps. I would also like to be able to use Amazon's Mobile App SDK. 

Is there anyway to access the code behind the blocks and / or write our own code (using our own preference like PHP, JScript,etc...)? 

--
App
for RESTful APIs: yes, see also several examples here https://puravidaapps.com/tutorials.php


Is there anyway to access the code behind the blocks and / or write our own code 

you could write your own extension...

more information about how to create an extension see here 

however that will be more advanced and will require some Java skills...

also you can use JavaScript in the webviewer component, for some examples see

file:///mnt/sdcard/AppInventor/assets/<NAME OF YOUR HTML FILE>.html
file:///android_asset/<NAME OF YOUR HTML FILE>.html
HTML file

<!doctype html>
<head>
 <meta name="author" content="puravidaapps.com">
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <title>Test</title>
</head>
<body>
 <script>
   document.write("The value from the app is<br />"
  + window.AppInventor.getWebViewString());  window.AppInventor.setWebViewString("hello from Javascript")  </script>
</body>
</html>

-- 
Thank you. I do have some limited Java and JScript (or was it JavaScript, it has been a few years) experience, so this is just what I was looking for. 

Blessings!

-- 


a project has disappeared!


Hello , I need urgently help , I was working on a project and suddenly , the project disappeared!.
I am very disappointed with AppInventor , I invested many hours of work  in the project and now ... I have nothing !
Can somebody help me? 

--
do you use the same Google login or did you log in as another user?

you also can import your latest backup into App Inventor. You did make backups, didn't you? See also why you should do this frequently here http://twodogapps.com/?page_id=686#BackupWork

-- 

Issues with project. Screen shot attached.... Dropdown AfterSelecting failing


So, I am having issues with a project. First, I'll post a screenshot of some trouble code.


Anyone see any issue there? There's a dropdown to select a function, then a call for a dropdown to select a destination.
The function dropdown properly calls the destination dropdown... but the destination dropdown routines don't work.

No errors. It's just that NOTHING happens after selecting.... the selection box just disappears, and the function is not completed.

What I am trying to do is allow a user to copy/add/subtract a subtotal or grand total from it's textbox up to a different location for 'lines' 1-10

I did have the destination function working on it's own strictly copying to destination. Same code used in the screenshot above, just without the function selection preceding it.... so I am unsure where my issue is.

Project size on disk on my computer is 139KB

--
So, I have the secondary spinner NOT visible. seems that it fails to work when it is not set to visible. Works when it is visible.

Is there a way around this? I don't understand. It calls up even though it is not visible...... not sure why it doesn't function right.

I really don't want it visible.

I also tried using a set visible true/false when it is called, but that didn't work.

Any ideas??????

-- 
Set the spinner in the designer to visible true and set the height to 0.01 on initialization.

-- 

texting limit


Limit ReceivingEnabled Notification for a certain Number.

I have set ReceivingEnabled for texting to 3, which works perfectly. what I am wondering is, can I limit the notification to display only when its ...
14. 6. 26. 작성자: Ibrahim Ghazali - 작성자 2명의 게시물 3개 11회 조회

Texting Component Limit.

It looks like the MessageText received is only limited to a number of characters . Is this correct? I say so because when I received a 220 ...
15. 10. 7. 작성자: masterlemmi - 작성자 2명의 게시물 3개 14회 조회

Re: "Generic failure, message not sent" error when using Texting component.

There is a limit to the 'length' of a standard sms message. You might fix a ' timing' issue by using a Clock.Timer to create a delay between ...
15. 6. 23. 작성자: SteveJG - 작성자 3명의 게시물 7개 400회 조회

Re: SMS Texting with Emoji.

I understand when using Chinese glyphs and possibly Arabic script, the sms limit seems to be about 35. These are non-Latin characters.
15. 5. 11. 작성자: SteveJG - 작성자 2명의 게시물 4개 81회 조회

Re: Texting Issue (URGENT)

There is a limit to the character count of a sms message you send. Sms allows 140 bytes: this translates to 70 16 bit wide characters (non ascii ...
14. 12. 1. 작성자: SteveJG - 작성자 3명의 게시물 11개 43회 조회

Re: Texting receive message problem.

the limit is 153 characters, star issue 234 https://code.google.com/p/app- inventor-for-android/issues/detail?id=234. to star an issue means, ...
14. 10. 13. 작성자: Taifun - 작성자 3명의 게시물 3개 48회 조회

Re: SMS lenght text.

Texting sms messaging. There is a limit to the character count of a sms message you send with App Inventor 2. Sms allows 140 bytes: this ...
14. 12. 16. 작성자: SteveJG - 작성자 4명의 게시물 7개 70회 조회

Re: SMS TEXT Message Recive with 200+ characters Corrupted.

the limit is 153 characters, see also these threads. https://groups.google.com/ forum/#!searchin/mitappinventortest/texting$20limit.
4월 14일 작성자: Taifun - 작성자 2명의 게시물 2개 17회 조회

How to detect other apps on device.

I've got a group of students looking to create an app to limit social media use. Is there any way to detect other apps running on the same device ...
2월 8일 작성자: Kelsey Lied - 작성자 2명의 게시물 4개 30회 조회

Frequently Asked Questions (FAQ)

... boardNFC TutorialSMS Texting tutorialYouTube AI2 video tutorialsHow Do You - WolberTruston Teaches Tech - Android development with AI2Canvas, ...
12월 1일 작성자: Abraham Getzler - 작성자 1명의 게시물 1개 2931회 조회


SMS TEXT Message Recive with 200+ characters Corrupted


i need to receive some Text messages with more than 153 characters , specifically when i get a msg with 175 chars  the GET MessageText Returns me the last 50 , so i cant do anythign about...

is there anything i can do to get the entire message?  or the first 100 characters

--
the limit is 153 characters, see also these threads

-- 

How can we save an image chosen by the user to google drive using app inventor?


I'm trying to save an image chosen by the user to google drive using app inventor. How do i do so?

--
see my example here https://puravidaapps.com/drive.php

-- 
Its not clear.. Could u pls explain the php  part more clearly? Also is there any way i can save it to drive directly without using php?

-- 
that example does not use php, it uses only App Inventor
you might want to read the large green box on the bottom of that page

-- 

Issue with the emulator and AI Companion


My other projects work on my app inventor. It works in the MIT App Inventor App on my android. But one of my certain projects doesnt seem to work fully. It displays one of the screens but when i click on a sprite that takes me to another sceen that screen doesnt show and it crashes on th emulator on my computer as well. I really need help on this project. Thank you,

--
see here how to switch screens correctly
--

Where is the Clock ???


I do not find the clock !!!

--
you can find it in the Sensor drawer

-- 

Viewing blocks in the blocks editor


When i open this aia file it takes a long time. When it finally loads, I select Blocks. When the blocks editor final opens there are no blocks to view. I have sort vert. horz. and by cat. the blocks never appear? I have done all i know to do and still can't see blocks. Suggestions?


--
I am having problems with this too. The blocks editor has real problems with this. The blocks are there, when you try to sort by category, you will find them. 
But what you have is really extreme. Why don't you put all the text in a text file or CSV file and read it in?
Also, do you really need that many fields? Maybe you could reuse some, because you cannot show them all at the same time, or maybe this is a case of using more than one screen?

-- 
PLEASE do not reply to me privately. You wrote:
Don't know how do locate text file or csv file. I uploaded text file to apphowever app will not open that file. mp3 or image file it will open but not text. I'll fine a app with that concern and send you block images. Will be awhile. 
Did you read this:


ReadFrom(text fileName)
Reads text from a file in storage. Prefix the filename with / to read from a specific file on the SD card (for example, /myFile.txt will read the file /sdcard/myFile.txt). To read assets packaged with an application (also works for the Companion) start the filename with // (two slashes). If a filename does not start with a slash, it will be read from the application's private storage (for packaged apps) and from /sdcard/AppInventor/data for the Companion.

at: http://ai2.appinventor.mit.edu/reference/components/storage.html#File

Maybe you can benefit from some of Taifun's top tips:http://puravidaapps.com/learn.php

-- 
I looked at this a bit but I can't view the blocks i my system either.    There are 5300 blocks, which I assume is breaking some kind of memory limit in the browser.

I'm surprised Ghica can see the blocks when she sorts by category -- I can't even do that.   But then again, if this is a browser memory issue, different systems will fail in different ways.

I don't have a good idea for how to salvage your project:  Hopefully, you have saved earlier versions from a time when the project was not so large.
If you can do that, then you should redesign the app to use fewer blocks, using some of the ideas that Ghica mentions.

For what it's worth, here's the blocks definition file from your project.  You can's load this into app inventor, but I might be of some help in remembering what is supposed to be in the app.
kitchenhelper.txt

-- 
Thank you Ghica and Hal for your time and information.

-- 
Seeing how much work you put into a labor of love,
I chipped in and wrote an extract app (AI2, of course)
to recover the text from your blocks.

I had to use the excellent Notepad++ to filter out just the text blocks from the XML
before I could get the text to upload into the AI2 Media drawer.

You should be able to copy the text from the emulator text box output window, I hope.
If not, add another File component for output and work from there.

2016-04-15 16_07_18-5554__build_.png 표시 중



-- 
That is a great piece of work! Maybe useful for others too.
--
Disclaimer - it only works on leaf nodes of the XML tree.

-- 
Thank all for your advice and help. It is very deeply appreciated.

-- 
Because I am apparently the only one that can see your blocks, I thought I will offer some help how to continue.
Here is a version without blocks, so you can start with the UI again.
But I strongly advise to work at the UI first.

For example, I saw a block, when SubmitRecipes.click, that consists of 4559 !!! blocks. I wonder how you managed to create it in the first place!

Te blocks apparent intention is to look through all the choices of all possible recipes. A much better way to do this would be to have a file for each recipe, with an appropriate name.
The submit block then just calls a procedure with an input parameter telling what the choice is. This procedure reads the appropriate file and displays it in ONE label. The file has already line separator characters in it, or if you would have a text of one line you can use \n to put in line separators. In this way you can delete all text fields.
In fact, this would cover the majority of the functionality of you app already. Tere is a display of psalm lines that could be much simpler, but if you attack the recip[es themselves this does not matter too much.


-- 

Can I interrupt an active text-to-speach action.


I made an app that displays information about a museum object. This information can be several lines long. The user can, by pressing a button, start a text-to-speach action so the information is read to the user. The way it is now, the text-to-speach continues when the user, for some reason, has selected another screen. I would like to be able to interrupt the text-to-speach action in such a case. Is this possible?

--
I suggest queueing up individual sentences onto a list, serviced by the speech component.
Each time a spoken sentence ends, start saying the next sentence and drop the head (slot 1) of the queue.
Have the Screen Change button post the request to a global variable, but not change screens if the speech queue is non-empty.

For more responsive screen changes, have the speech queue service routine check the global screen change request variable
before starting the next sentence.  If a screen change request is pending, switch screens without any more speech action.

See this sample in the Gallery for interrupt-able speech ...

-- 

Emulator problem


I'm having one issue with app
As you can see in my designer view
this is how the app looks like
http://prntscr.com/as3ii5
but when I test it, the phone brings me this kind of frustrating thing
http://prntscr.com/as3j8b

Anyone had a same problem?

--
you could try to test on a device instead or use another emulator, see also http://twodogapps.com/?page_id=686#Emulator

-- 
I also tested it on device, and the problem remains the same.

-- 
the webviewer is no full browser, so probably this is not working?
what are you trying exactly? can you provide an example project (aia file)?

-- 
I solved the problem by resizing the button pictures down to the right size.

-- 

Add integer variable to a list


I have a student that would like to add an integer variable as an item in a list. When she adds that code she gets an error message.

She initialized a global variable. The variable contains a random integer.

She is trying to join text strings and the integer like this "Your random number" variable "is a nice number"

She gets an error message when she adds the variable to the join string. It works otherwise.

Does anyone know how to accomplish this?

--
Can you please post a screenshot of her blocks so we can take a look at them?

-- 
See attached for three ways to do this.

Maybe she is confusing JOIN with ADD TO LIST?

2016-04-12 16_44_49-MIT App Inventor 2.png 표시 중
2016-04-12 16_48_31-MIT App Inventor 2.png 표시 중

2016-04-12 16_53_03-MIT App Inventor 2.png 표시 중


-- 
Here is a screen shot of what she is trying to do. She can't add a global variable to a list.

-- 
well, "This block can't be in a definition"... use it in Screen.Initialize instead

-- 
PS: and please keep the discussion in the forum instead of sending private emails. thank you

-- 


Problem: Using Activty Starter to search for location


Hey guys! When I use ActivtyStarter to search for a location in Google Maps, the first time, it searchs in Spain and obviously doesn't find anything (I'm in Venezuela). I need to press the button to go to my location. Does anybody know how to search for results around my location without pressing the button?

--
Not everybody on this forum is a guy. Mind your words please.
To get an answer to your problem, you have to provide more information. Did you follow one of the Google-map tutorials and have this problem?
Or, which button are you referring to?
Show your relevant blocks!

-- 
I guess I found the problem:

I think it's a Google Maps issue. Because you can't set your default location, so they search where they believe you are.

I set ActivityStarter to this, to show a route between two addresses: 

Action: android.intent.action.VIEW
ActivityClass: com.google.android.maps.MapsActivity
ActivityPackage: com.google.android.apps.maps
DataType:
DataUri: http://maps.google.com/maps/?saddr=@51.9336855,4.3431723&daddr=@51.9171257019043,4.361827850341797
ExtraKey:
ExtraValue:
ResultName:

But it often searched in Spain. However if you try with this:

Action: android.intent.action.VIEW
ActivityClass: com.google.android.maps.MapsActivity
ActivityPackage: com.google.android.apps.maps
DataType:
DataUri: https://www.google.co.ve/maps/dir/51.9336855,4.3431723/pizza
ExtraKey:
ExtraValue:
ResultName:

It searchs for a good route to your pizza (Here, the key value it's "/51.9336855,4.3431723")! Therefore, It worked for me, you can try.

-- 


CSV properties


I wish to append a new row into CSV file (action triggered by clock), being able to open it in Microsoft Excel in the following set of data:

Auto Generated Inline Image 1 표시 중

Auto Generated Inline Image 2 표시 중

What's wrong with these blocks Guys? I'm still getting results in just one row and lots of """ signs that are not desirable.

--
remove the list to csv table block.

-- 
I am still getting all data in exactly one row.

-- 
use Do it to debug your blocks, see also tip 4 here

-- 
I use this approach
CSV.jpg 표시 중
-- 
yes, list to csv row will convert everything into one row
you probably like to use list to csv table instead?
assuming, global templist is a list of lists...
you might want to provide a screenshot incl. Do it result next time...

-- 
To elaborate, my bit of code adds a single line to a CSV file every time it is called (templist is just a simple list). The point is you need to add the /n to make sure the next time the code is called the data is written to a new line.


--
Richard Freestone the problem is that Excel put this entire row into one cell. It doesn't split a list to separete cells in horizontal way. I wish to get rid of the "" marks too.
Auto Generated Inline Image 1 표시 중


-- 
The problem is with Excel. 
Despite the name (Comma Separated Values), it usually uses ; as separator value instead of ,
You could transform the text in the file by using replace all text first to replace " by an empty string, and next, replace , by ;
A problem could be that your values also contain a , therefor the " is used in AI. And maybe, if you use ; instead of , excel will see your " enclosed values as text, and strip them.
Try it out.

-- 
My version of excel (2007) works OK with commas etc. Not sure which version you are using. You could try making the extension .txt then excel will ask for separators etc


--
Here is my csv created by App Inventor which loads OK into Excel 2007

-- 
Does it help to tell Excel ahead of time that those columns should hold only numerical values before loading the csv data?

-- 
I think I can see a problem with your CSV file in that it does not follow the pattern "data1","data2"," data3","data4",         etc. I don't know why it has happened.

I can see things like data1""data2 and data1"data2. This will confuse excel.

Happy to look at your code and your CSV file if you post them.

--