2016년 12월 1일 목요일

video on facebook only sound

i made an apps .

with web viewer for a facebook group . 

however , the video is sound only , just black screen  .

how i can show the video ? 

Show your blocks. Someone could find a solution maybe then.
Cheers, Ghica.

its my block on screen 1 , screen 2 ( BCB ) still working on the blocks .

there is only webviewer as component

How can you know that you have a problem if you do not have the relevant blocks yet??
First make your app, then describe precisely what is going wrong, for example by showing the relevant blocks, otherwise you are wasting our time.
Cheers, Ghica.

To be able to play Youtube videos in the webviewer, you have to edit the manifest and add android:targetSdkVersion="14" or higher. Thank you Boban!

It does not look like you have used the forums yet, as a search using the search box above would have returned several threads about this topic.


but it does not need any block to follow links 

ok, ill try to get some manifest editor


Is there a way to compare all values stored in TinyDB?

Hello Friends,

I am saving a value(i.e., Date Of Birth in the format MM/DD/YYYY) in TinyDB with User defined "Tags".

If user enters "tag" name which is already stored in TinyDB, then notifier notifies user to enter different name.

Problem is, How to compare values(Date Of Birth) with the values those already stored in TinyDB(that too without a tag)? 

I tried attached blocks but Problem not solved. Without specific "tag"  name its unable to compare two values.

Please help me.

error.png 표시 중

I think you have a strange if.
The or part will never work, because response is a string and the result of GetTags is a list. And what would be the purpose of this?
For the red triangle, maybe it will work if you define a local (or global) variable and set it to the value of the call TinyDB1.GetValue, and then compare your textfield with this variable.
Cheers, Ghica.

Thank you Ghica.

As per your suggestion I can use and define global variable and set it to the the value of the call TinyDB1.GetValue. 
But this works only for one tag and its value. 

My plan is to compare all values (i.e, multiple values say each and every value) stored in TinyDB under different "Tag" names. These "Tags" are user defined.

So, defining global variable not solve my problem.

Please check attached flowchart. Believe it may give some more idea about my Problem. 

error.png 표시 중

flowchart3.png 표시 중
What do you do if some one has twins?

They are born on the same day.



Sir, I am not getting your words. Please explain.

Before I can explain why your or cannot work perfectly as you claim and why my global or local variable can work with as many tags as yo like, let us have something clear. You have a TinyDB with user defined tags and birth-dates as values. So, for example
Tag.   Value
John  01/02/1956
Mary  12/12/2001
Annie  06/06/1998

Now, someone tries to add another birthdate for another Mary and you find that Mary is already there. You find out because when you retrieve the value for Mary you get some other value than an empty string. So, you give the person the option to enter another tag, Mary2 for example, and try again, until the user entered a tag that is not a duplicate.

Is this what you want to do? If not, explain.
Cheers, Ghica

I asked the question about the twins to find out more about your application,
and what each tag and its value means in the real world.

Let's start with some sample data.

Imagine I has a son, ABG_Jr, born yesterday.

What tag and value would you use for him?



Yes Sir.

You are right.

With tag comparison , I also want to search Whether DOB value duplicates?

@Abraham Getzler.

Sir, In your example.

In my application, I use: ABG_jr = tag and Value= 11/30/2016.

How did you conclude I am a sir? Think again and apologize.

If you post your .aia I will correct it for the duplicate name problem.
For the duplicate birth-date problem I need more information.

Suppose I am entering the information for Mary2, do you want to find that she has the same  date of birth as Bob and Alice at that point in time?
If yes, what do you want to do with that information?
If no, when would you like that question and how?
Cheers, Ghica.


In my application, I use: ABG_jr = tag and Value= 11/30/2016.

So lets say my wife also had a daughter, ABGina on that same day, so I would also have
ABGina = tag and 11/30/2016 as a value.

You say you are looking for duplication.

Does this count as duplication?


for 23 people in your database you already will have a probability of 50% to get 2 people having birthday the same day... ;-)



1. How did you conclude I am a sir? Think again and apologize.

There is nothing to think behind it. I am showing "respect" by quoting "Sir". "Sir" is a highly revered word in "India". 
If quoting "Sir" is a mistake, please forgive me.

2. If you post your .aia I will correct it for the duplicate name problem. 

Finding Duplicate name is working perfectly. My problem is about, finding duplicate Dates.

@ Abraham Getzler, Taifun.

Main objective of my App is : To generate Immunization Schedule.
Targeted Users: Individuals & Primary Health Centers - India.

I use Date Of Birth to calculate Vaccination Due dates. 

No problem, If the Date of Birth of two or more Person is Same.

Also, What I thought is, We can Save "ABGina" and "ABG_jr" in single tag.
Tag = ABGina and ABG_jr. 
Value = 11/30/2016.

App is 90% completed. Only thing is, I am stuck at "this" comparison.

Whether to omit Duplicate Dates or to allow Duplicate Dates ?

Suppose,If I choose to Omit, then I need to compare Dates and How it will happen?

Thank you.



How can I set the scrollbar not visible when scrolling?

Is it possible to adjust the smoothness of scrolling?

as far as I know unfortunately this is not possible

"Hide scrollbar when scrolling"

This is possible with a simple trick.

Short guide:
1. Create a screen
2. Add a vertical arrangement
3. Set the height to "fill parent" and the width to 97 percent
4. Drag a new vertical scroll arrangment in the vertical arrangement
5. Set the height from the vertical scroll arangment to "fill parent" and the width to 100 percent
6. Now the scrollbar is no longer visible when scrolling

The aia file is attached.

Here is a screenshot from the designer view:


best regards,

That's actually a nice and simple trick, Mika.
But I don't see a point in this. Why would you like to hide it, Ishaz1? The scrollbar actually lets the user know that there's more content outside the visible area.


Moving a Gauge Needle by rotating it to a Position to set a Temperature

Hello, Im having issues trying to scour the webs for an example of how to move a gauge needle sprite to a position within a circular stationary backround sprite. I already know how to tap it into position, but I want the action to FOLLOW the finger movement across the canvass. Any help / examples, AIA links, redirects would be appreciated. I don't need any help mapping the angle to a value as my math is strong, but sliding the needle around seems to be my biggest headache.

Thank You!
gauge image sprite.png 표시 중
BTW, I'm using Android APP Inventor 2


Here's the AIA, APK, All relevant image sprites. That should be all you need to get the idea. There's a part where I add 17 to the lowest number I wish to send over bluetooth, because it was negative 17. You cant handle neg numbers on the buletooth serial com on an arduino. Theres another part where I make comparisons so that if I drag the needle outside of my desired range, it will fall to the min or max value (whichever is closer) on the arduino side, I had to flip the readings around and map them to my desired value range. Arduino code looks like this. I do this for a living, so i appreciate donations, but I'm glad to hand this out to the needy as a freebie. If you wish to donate, then send me an email with (I have a donation for you)  in the subject line. And I'll send you a paypal donate request ENJOY!

#include <softwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX for the HC-06 Bluetooth module TX of one goes to the RX of the other and vice versa

void setup()


void loop()

  if(mySerial.available > 0){
    byte newVal = (mySerial.read());
   newVal = map (newVal, 160, 0, 75, 180);    // you'll get a declining number as you move the needle to the right, so the mapping needs to be done in reverse.
 Blank Gauge with numbers F.png

you might want to add a screenshot of the relevant blocks and your aia file into this thread
this could help others, who are looking for a solution to a similar problem


I updated my previous comment. Enjoy.


Multiple tags for data base or use a list

i am making a app with multiple separate data to store in tinyDB, should i use multiple different tags or use a list to contain all data. i want the way that allow the app to run the smoothest. Thanks

my suggestion is to work with only one tag and lists or lists of lists

thanks, really helped


This totally depends onto your app complexity and how much data you need to store and also the format of data. If you provide some high-level info on what you try to accomplish, it will make it easier for us to provide a response.



Export List to CSV FIle

Hi, I am new to App Inventor, trying to export list of form fields to .csv file. I have tried the ffg code, but the result returns the same record for both

I have also tried, saving to file after saving the data, and result is as follows. I require it to be a table with rows. Could someone please assist, or provide a similar example. Thanks 
what about using a list of lists to store your data and only one tag to store the complete list of lists in TinyDB?
• How to work with Lists and Lists of lists (pdf) by appinventor.org

the list of lists you can convert very easily into a csv table using the list from csv table block...


Do you have an example of this. Thanks

The data that you have saved into TinyDB, are they List or CSV?
The data that you have (1,12345,200,Yellow,Yes), is this what is stored in TinyDB? Is it list or csv


The 2nd screenshot shows the Save part. The example I have is a Form with fields the example response is = [1,12345,200,Yellow,Yes]. I save it to a list, with each field as an item.

The end result that I wish to achieve is to Export the Records to .csv  
The example in csv should be:
Row 1:  [1,12345,200,Yellow,Yes] 
Row 2: [2, 766543, 400, Black, Yes]

For writing to TinyDB, why do you convert to list and then later wanting to convert list to csv? Why not initially save as csv into tinydb?


Thanks I will try that approach.
However I have played with E.Mitchells Code and added File Export List to CSV and it works (Attached screenshot).


Display a portion of a PDF as one screen

I am trying to convert our Emergency and Safety Procedures flip chart into an app that can be placed on our internal devices.

I have a PDF version of the chart that I can trim down but need it to display without messing with the text.

That is if the PDF is stored locally. I am looking for a way to use a PDF page as the link for the text.

  I am looking for a way to use a PDF page as the link for the text.

sorry, I do not understand, you might want to elaborate


✱✱✱ continued ✱✱✱

how to refresh tinyDb ?

I've completed (insert,edit,delet) ,But I did not know how to do refresh tintdb or refresh my screen and thnks

I don't know what you mean by refresh.
When you do a StoreValue the data is permanently stored in TinyDB.
To display the updated value you can use a label.Text to display it's new contents with GetValue.

this my screen ,When you click on the search button with ID,get the values fromTinydb and display in text box ,here current unusual and actually show , but when I want to search again in the sam screen ,the values are not displayed in this case must be  work refresh for display the values again, but how ?? and thanks

Capture1.PNG 표시 중

It would help if you could show the blocks to see what needs to be done.
I think I understand what you want to do.


I have a problem about web viewer

i need help about my app inventor project.
i have a jquery image cropper: Go to website
When I try on any browser to there is no a problem.
i added this url to web viewer in app inventor2, but I can not file selection process when I click the button.
this is my problem and i need help.
(uploading process performed by a file jquery)

Well, I tried your website, but it does not work for me using the Chrome browser.
Anyway, I suspect that this will not be possible using App Inventor. The WebViewer is not a full function browser.
Cheers, Ghica.

as Ghica said

probably you are interested in my image extension https://puravidaapps.com/image.php
there are currently 2 methods available

you could write your own extension and create an image cropper block yourself...
however currently the extensions are restricted to non visible components

more information about how to create an extension see here https://groups.google.com/d/msg/mitappinventortest/Ip2AX036d0U/5NJlAEbFCgAJ
however that will be more advanced and will require some Java skills...


Thank u Ghica and Taifun.
is it available like this? : http://stackoverflow.com/questions/5907369/file-upload-in-webview
maybe we can handle this problem via ActivityStarter on app inventor.
but im new in android development :S
Thanks again..


What the... Is empty returns error instead of true

"The operation is text empty? cannot accept the arguments: [*nothing*]"

I think, that this block is to detect nothing, isn't it?

I suggest fixing it.

Also I suggest to add to FirebaseDB command "When valueStored" to fbDB (hmm fb is also shortcut of Facebook...) and making when dataChanged to not being runned after storing the value, because it makes impossible to make app to work as server.



"The operation is text empty? cannot accept the arguments: [*nothing*]"
I think, that this block is to detect nothing, isn't it?

that's correct, this is a bug
could you please provide a screenshot of your blocks, which show this issue?
Well... That's... Well I dunno is that needed. It happens sometimes in the same moments when text is empty. I only use it in text.

In lots of apps. There is nothing I can show.

The only thing: I make only very advanced apps and now I'm working on own engine based on WebViewer (the app must work online). It uses Firebase. Later I'm going to add canvas based apps to make.

I think, that help isn't longer needed and this topic can be closed. I just added another Firebase components specialy to store values.

Ohh... So... That does not works still...
And, in some positions (I dunno does that depends on what) it shows [*nothing*], in some it shows [*empty-string*] and in some it works...


So... Im going to send screen shot

Here is it.
ai2glitch.png 표시 중

ok, so the value in event FirebaseDB.DataChanged sometimes is 'nothing'
@MIT: as far as I understand, this is a bug which should be fixed
thank you for finding it.

Thanks for finding the bug, and, Taifun thanks for diagnosing it.
We''ve got a list of changes to make to Firebase, and we'll add this one.


smart home Arduino project with MIT app inventor

Hello Please I need some help because I'm trying to design an application that can control a smart home with an Arduino controlled with a smart phone (I did the application using MITapp inventor).
An application that allows me to control the opening and closing of shutters, lighting of the house, a sensor to measure the temperature and humidity (DHT11).
 But I have a problem with the temperature display and humidity as it appears on the same label and what should I do to display the temperature in a label and humidity to another label? Thank you kindly help me 
Here is my program:

I tried with this programme but it doesn't work

You need a way to mark your sensor reading messages to identify them as either temperature or humidity, so the receiving blocks will know where to show them.

For example, println("T=",t);

and when you receive on the AI2 side,
If connected then
   if bytes available > 0 then
     set m = incoming message
     if the front of the message is "T=", copy the rest to the temp label
     if the front of the message is "H=", copy the rest to the temp label

See the text blocks for length(), split at, segment.

You are probably receiving both T and H in the same message m.

Try setting your BT Client Delimiter Byte to 10 in the Designer, and set the BTClient.ReceiveText Number of Bytes to Receive to -1.

This will get you only one reading per message because it will split them at the Line Feed.

thank you for your reply
I have a question:: Can I take a break in the application (as I do in the Arduino (delay))?
can i do this with timer ??

AI2 has no wait() block,
but you can use a Clock from the Sensors drawer and set it as a timer.

see Scott's "Please Wait" method here Wait or delay method fail


Lost Projects

Over the course of 3 weeks I was able to create multiple apps. Today when I logged on to AI2, my projects were not under my user name. Is there a way to retrieve the finished apps? 
Try again, using another browser (FF if you used Chrome, or the other way around). And always export your apps to .aia files as backup.
Cheers, Ghica.

Also, are you sure you used the same google account to login today that you used in the past to create your projects? 

Danielle replied by email:

Hello all, 
Thank you for your help. 

I have tried using other browsers to retrieve the apps. This did not work. 

I have also made sure I was using the same google account. The only app I was able to retrieve was the one that I restarted on Friday April 1st. 

Is there anything else I could try or can the cloud software retrieve old files? 

I have tried using other browsers to retrieve the apps. This did not work.I have also made sure I was using the same google account. The only app I was able to retrieve was the one that I restarted on Friday April 1st. Is there anything else I could try or can the cloud software retrieve old files? 

I started over with my apps on Monday.  Tuesday I logged in and they are gone again!  No one else in my school is having this problem.  What else can I do?


probably it's time to change your password?
also backup your projects frequently and export aia files, see also http://twodogapps.com/?page_id=686#BackupWork
so next time you just would import your project again...


How to flag inappropriate content in the gallery

Hello, I am a teacher and I am looking at the gallery as a place to share students' work.

I just found this app in the gallery: http://ai2.appinventor.mit.edu/#4868997241634816 and it looks like inappropriate content for young people.

Is there a way to report or flag this sort of thing? I know on the Scratch gallery, there is some group moderation and some oversight from Scratch about things that are getting uploaded. What can I do here?

I love the gallery idea, and it's going to be really useful for my classes, but it's really not going to work if they can find things like this. :(
As a follow-up, I now see the REPORT button. So you can consider this resolved. Thank you.


Please let me know when this has been dealt with.

FWIW, I expect we'll be getting more stuff like this.

Kelley, thank for letting us know.

== Hal

Dave is working on it.

Hi Kelly-
The user's inappropriate content has been deactivated (It won't show up in a search).