2014년 11월 28일 금요일

Emulater Outdated

The emulator appears to to be based off of Eclair. Can we get something more moder? Kit-cat or Lollipop based? Why has this not been updated. Also, the emulator frequently loses sync with the editor and I have to reset the connection and restart it continuously. Is that normal?

 If you're doing a lot of block changing and component management while connected, it'll probably disconnect.  The best way to work efficiently is to close the emulator when you're making lots of big, fast changes, then start it up again.  The emulator is from Google, and it's based upon the worst case scenario.  

Why don't you try the free emulators from Genymotion.  They're great, faster, and make development easier... plus, you can get various devices and OS versions.

Emulator behind proxy server

i can't test any WebViewer components because my emulator isn't connected to Internet.

I've tried this test:
and the result is:
{ "status" : "OK", "version" : "2.2" }

My SO is Linux Mint and i'm behind a proxy server auth with username and password.

You can use the WebViewer to view resources stored in your Media/resources.  Taifun has some interesting code snippets showing how to do that.

Proxy server?  Talk to your IT person, you may have  firewall issues regarding port 8004 ... if that is blocked, no emulator.

I don't want say a mistake (because generally i use a real phone) but i remember that before the last AI upgrade, i tried and it worked.

check, if you can access the internet with a browser on the emulator

Emulator and web connectivity

First day and first try at this. I need some advice. I have set up a button and on click I want it to go to a web API and this will return json data. I then want to display the json data in a listbox. I think the blocks I have put together work but the emulator gives me nothing. I am not sure where to go:

1.Does the emulator connect to the web as normal
2. Is my coding correct

If someone can help it would be very much appreciated. I am not sure how to upload the project so here is what I have set up:

One button, one web component, one list box

Button on click event it runs the following
web1 set url to (my url)
Call web1 get (definitely needs a get request)

The url is tried and tested and works well to retrieve json data from a web api

When web1 got text event
set response content to call web1 json text decode listview1 elements

Close. You need to get the ResponseContent, not set it.

Set listview1 elements to json text decode get ResponseContent.

See the stock quotes tutorial http://appinventor.mit.edu/explore/ai2/stockquotes.html

Does your 'Company network' have a firewall?  Talk to your IT person, you may have  firewall issues regarding port 8004 ... if that is blocked, no emulator.  

If you are on a company network, be aware, firewalls block lots of AI2 communicagtion paths and cause activity issues.   It is not possible to use AI2 for all functions if you are using complementary Internet use from most hotels, restaurants, hospitals, schools etc.  Their firewalls block the ability of AI2 to 'talk to itself' ... that is use the emulator.  You may be able to 'build blocks' but you may not be able to 'live test.'

That may be your issue.

set listview1 elements to call web1 json text decode get response content 

Screen Sleep

How do I trigger something after screen is switched on after it goes to sleep?


You could put code into the Android's 'back button'.    when Screen1.BackPressed do and open another screen screenName  Screen1   ?

Try it.   Does it work?

Sorry, I mean trigger event at screen wakeup after going to sleep. 

Probably not possible with AI2 Richard, that would require the AI2 app to work in the background and AI2 cannot do that.


How to pull a data from external Bluetooth GPS using MIT App Inventor

I am new in android app programming? I have an external Bluetooth GPS (DUAL XGPS150A) device.
I want to make an app that can read the data such as latitude and longitude from this external device.
Is there any tutorial that I can refer to or can someone give me some guide.

You might read some of the posts in this forum regarding Bluetooth https://groups.google.com/forum/#!searchin/mitappinventortest/bluetooth

The information in the threads there might give you some insight.  Bluetooth protocol can communicate with arduino miniPCs and you might also search for arduino for ideas because what you want to do is similar.

Can Bluetooth with AI2 capture the coordinate information from a Bluetooth GPS?    Possibly.  You will have to experiment.

New to AI2 android block programming Sara?    so....

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

should help make you fairly expert in a short time.

When you get a solution, please return and tell the forum users how you did it and post some screen images.


How to pick image and show to drawing canvas

How to pick image and show to drawing canvas?


Do the tutorials, particularly the Paint Pot tutorial:

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


Re: ERROR blocks not loading properly

I get this error code when I try to load the blocks section on Screen4 of my app "The blocks area did not load properly. Changes to the blocks for screen 5627058735546368_Screen4 will not be saved." I am using a beta version Windows 10 Operating System I'm sure if may have to do with it.

Please do NOT flood or spam this forum.  I have deleted the other 9 messages you posted.  Post ONE and one ONLY in the future.

How big is your AIA file?


Win10 works fine with AI2 on my laptop Tristin, so it is probable the issue is not the Win10 experiment.  Are you using WIFI, the emulator or USB?   Be aware an upgraded version of AI2 was released several days ago.  If you did not upgrade Companion from Google Play to use on your device (if you are using WIFI or USB) or did not upgrade the Companion if using the emulator and did not follow all the directions, you issue might be simply that you did not upgrade.   However, it could also be one of the following issues with your Project:

One of the following  probably applies to your code (all may not apply to your code - these issues often prevent compiling an apk, making an aia or sometimes, connecting to the MIT AI2 server). 

1)  You have coding errors in your blocks.  In the Blocks editor, look in the lower 
left 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 
you do not get a compile, so fix the yellow triangles too.

2) Your source file (the aia file) is larger than the 5Mb limit allowed in AI2 or you 
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.    You can program 
apps larger than 5Mb in the browser, but they 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.

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 

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 

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

9) if you have BlueStacks on your home PC.  The emulator on AI2 cannot run unless BlueStacks is disabled and all of its processes are shut down.

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.  Projects using these tools need to be tested on a device.

The problem could be something else, like running an old version of Companion ...in this instance,   Projects > Hard Reset , then if there are issues a pop up will appear (if no issues, nothing will happen...just smile).  When the pop up appears, follow the instructions very carefully, then reboot your PC and try again.

refer to: search for ERROR blocks not loading properly


central hub for sharing source code?

If I want my students (Grade 7) to find and critique AI2 source code written by others, is there a good place to send them? Scratch makes it easy for my younger students to explore and remix the work of others. Is there a similar hub for App Inventor?


MIT had / has a thing called Gallery ...it is/was a depsository for Ai Classic apps ...  http://gallery.appinventor.mit.edu/#  

On November 5, MIT announced (very quietly) that:  "FYI, we're working on a new gallery.   Expect an announcement in the next couple of months."

In the meanwhile, dozens of individuals maintain blogs, web pages etc. with Android studio Classic   and Android Studio 2  Tutorials.

If you look in the Tips and Tricks section of the forum, there is some Ai2 code posted there  AND if you read through the posts, will often find code blocks to do interesting things, sometimes there are aia files with the code too.


What are APP inventor limitation

I am new to APPinventor and have very limited knowledge in programming. 

I want to develop a very unique and special app (it is quite a big project I must say).  Can someone tell me if APPinventor is the good thing for me?

I want to develop an app with :
- a calendar linked to somekind of a diary (a place to enter notes and images).
- a drawing tool.
- a way to access the file directory (a place to consult txt. word and PDF files).

Can I do all that with APPinventor?

Sure... You can make your own diary, you can create your own calendar.  You can draw as well.  You can access files.

However, there ARE limitations.  App Inventor has a 5MB limit for its AIA files... Drawing is not extremely robust although you can do quite a bit with it.  Files are definitely accessible.

First, do the tutorials... they'll give you an idea of what things you can do, and how to do them.  The tutorials are located here: http://appinventor.mit.edu/explore/ai2/tutorials.

Also, read all of my tips in the links below:

WOW Thanks Enis,

I want to create a ''full and complete coaching'' app. 

When you say a limitation of 5Mb, you mean the entire app including all new entries (calendar, drawing or diaries)?

No, code blocks, components and assets.  Whatever gets added after the app is installed doesn't count.  Read the tips about the 5MB limit.

refer: search for What are APP inventor limitation


MenuOption not visible

I am using App Inventor 2 and i need to create a "MenuBar" but i can't see the MenuOption voice. How is it possible? I found only one tutorial about it. I can't find a solution. 


You cannot create menus in native AI2.  You might be able to do it with AppToMarket or AI2LiveComplete.  Here's AppToMarket...  And AI2LiveComplete: http://amerkashi.wordpress.com/


App inventor radio problem

I'm working in a radio station and i've been asked if i can do an android app for android users so they can listen live.
To be honest i know almost nothing, but with some tutorials i did a nice app android radio with app inventor.
But there is also a big problem i would say which i couldnt find any tutorial how to fix it.
If the radio is on, and i am getting a call and start a conversation or if i do a call while radio is on, the radio wont stop. so while i am talking on phone i also can hear live radio. And that is really annoying i can say. If someone can give me some advices would be awesome. with app inventor i use block editor.


yes, this is a "feature" of App Inventor Classic
you should use App Inventor 2 instead... App Inventor Classic will be switched off soon anyway...

Ok..but do you have an answer for my problem? an answer is what i need

sorry, there is no solution for App Inventor Classic, only for App Inventor 2

ok no problem, i can make radio in app inventor 2, but  can you pls tell me how to make radio stop when i'm talking on phone?

that goes automatically, so no exrta blocks needed

that dosent go automaticaly....i tried, and radio wont stop while talking on phone

I was talking about app inventor 2 and i tried it out, so it works on my phone with my app (still testing my app, have some other issues, but this works for me), when i call somebody or get called the music stops


getClip returns a file path not working

I am using the camera to record a video clip, the afterRecording block returns the file path under the following form:


If I want to use this path to reload or share the video I get an error conerning the file path.

I have a similar issue; have you had any luck resolving this yet???

I'll take a look into this and get back to you. 

I have the same problem. Images works but clips does not.
Clips returns a file name like 548 in a directory that is incorrect.
I know the correct directory. If it would return the correct name, I could build the fully qualified name.

I have the exact same problem....
I tried sharing a video instead of an image using Camcorder instead of Camera but it failed giving me Error 2001: Cannot find the file on your device.
Any solution for this problem yet ?!!

refer to: search for Error 2001


Speed of the finger on screen

I'd like to do an app which lets the phone vibrating, if you move your finger on the screen. As faster you're moving your finger, the vibrations should be more.
Can someone help me doing this?

Try using the Canvas component and use the flung event that will detect how faster your finger is swiped on the screen.


So, I've done this before I wrote here, but I haven't seen any reaction. Why?
I've pinned a Screenshot...

And I've replaced "close Screen" by "Close Application" and I don't see something...
Possibly because you are on Screen1, and you can not ever close screen1, all you can do is close application.

Also, if you want to vibrate, you need to have a Player or Sound component and then tell the app to turn on the vibrate for as many ms as you want.

You might benefit from reading the chapter in the AI2 free online eBook   http://appinventor.mit.edu/explore/ai2/tutorials.html   ... the links are at the bottom of the Web page.  Read it all but especially chapters 18 and 17.   You need to learn to program simple things before you try advanced stuff.

You said you are new.    Have you done the tutorials here MITs tutorials    http://appinventor.mit.edu/explore/ai2/tutorials.html  ?  The tutorials are your friend.  The forum members are willing to help, but you have to help yourself too, so do some reading, do some tutorials and have fun.

When you have tried more blocks return and ask a specific question after you have fixed your blocks.

I've written, that I've changed closascreen to closeapplication.

Now my phone does vibrations, if I touch it and move my finger. But it only does once. Can't I let it vibrating all the time, i'm moving my finger....

I'm sorry but I only need this app once. I don't want to do more apps. This app should be finished next week...
And I can't find chapter 18 and 19. But I try to read this, if I have time...

Exactly.  When you call the vibration it vibrates once, for as long as you tell it with code.   To keep it vibrating, you probably have to use a Clock and possibly an If else if    statement logic to keep it going.

Smile.  Your app is starting to do almost what you want.

Andreas... since it appears to be homework you're doing, I suggest you start reading pronto!

I've read the two chapters and tried to use a Timer. I also read everything what I found about the Clock in the E-Book.

But I don't know how to do...

This step, but only this step would be easier if I could use C#...

I tried a bit but I should move a block what isn't possible... How can I do this? (Screenshot)

I do not know either but here is what I would try

I believe the Vibrate (and the timer.false both need to go into the Timer block.   Move it out of Flung.
Also change the   false that is already in the Clock to true.   The other thing you need to do is either 
set Clock.Timer to False in the Screen.Initialize block (or do that from the Designer screen in the Properties by setting it to false there).

Does that help?


cannot find picture in phone gallery

I am using the camera component.

1. I took a picture and this will be stored in tinyDB and the image will be shown in the app.
2. I changed the photo via the image picker from the gallery.

Now I want to change the photo again to the first I made. But I cannot find the photo on my phones gallery. I tested the app also with another phone and a tablet. Where can I find it? Did I something wrong?
Thanks for your help.

You didn't do something wrong Joerg, the  AI2 Camera is one of several AI2 dysfunctional components.

he images the control takes (at least while in 'development' on my Tablet ) are stored here:
/storage/emulated//0/Pictures/app_inventor75.jpg     and others like   /storage/emulated//0/Pictures/app_inventor90.jpg etc
Most of these files are about 750 Kb.

How do you get rid of these images? They do not disappear when you close the app in development.  These images are persistent ..I doubt most developers know they exist and leave them behind after one plays with the control.

The Picture Gallery app in my Samsung Tab II will not find the recent Pictures taken with the AI2 camera until I turn the device off and restart. On restart, Gallery finds some of the images..but not all. Unreal. I can find them ALL with my tablet's  File app (not the AI2 control). Restart the tablet, some images using the Gallery ( ..the app's gallery, not the crippled one displayed by AI2) can be found in the Gallery. The images now can be deleted but only from a few places. Yes, they can be deleted permanently: find them with the tablet's File app, then delete them using this third party app. Not very tidy or professional. Doing this is like performing a scavenger hunt of your device's file system.

thanks for your quick response Steve. I will try now a workaround. This is not my ideal solution, but it will work. 
Have a nice day.

Just another question. if I understood correctly.

I am not running the app on the emulator. It is running under real conditions. And ist work although under real conditions like you have written in your post?

What I describe is what happens when you connect with WIFI.  The problems might only be specific to my Samsung Tab II but I expect they are universal.      I do not remember, but a few months ago when I was experimenting with Camera, I am pretty certain I also created an apk and installed and had similar results.

Taifun seems to think the control works pretty good (with some exceptions); perhaps he will post something and have a solution for you.

 You probably have a file viewing control on your device.   You can use that to search for the directory  of the images if it is something other than what I posted.   Be careful not to delete folders that are needed while you do that.  Most of those tools can find a file by using a search function..the problem is figuring out the proper file to search for.

Taifun seems to think the control works pretty good (with some exceptions)

yes, exactly, there are issues with some devices, especially Samsung devices, also the front facing camera does not work, we talked about that in the other thread recently
Pictures/Photos Project, is it possibile...?

the simple solution for you is to store the path to the taken photos in a list and the list in TinyDB. Later if you want to access one of the taken photos, just use the stored path from the list

Thanks for the info.


including (any) google APIs in projects ( if possible some unitized&simple way)

at 1st) I need to include google Maps Android API & Places API - I haven't found that possibllllity in standard AI2 so I'm asking, would someone make some enhancement for that ( or maybe I could do it myself - but I don't know if I can achieve recently, definitely I could add some APIs but some unitized system divided to gorups by type of API????)  or it'd be better to decompile .apk of my project to java source code and then work with it. 

2nd) I also need that SQlte enhnacement (i know AILivecomplete have it - is it possible to merge it with that APIs enhancement?)   . To clearify it - I'm developing front-end of one 'service' for Android - the core of the app = user model, database.... are made in PHP ( later probably Ruby on Rails). so I need SQLite enhancement just for testing purpose   and to do some partial dump of the original DB (maybe some other reasons where I won't use PHP fro some simple querying from that DB) and of course those 2 API ( at least up till now) and also I need to operate push notifications ( isn't  that already included)


except of the push notification requirement you can do this already with App Inventor and the web component, also you can use the webviewer component together with some HTML/JavaScript logic inside your app.

See some examples here

Concerning your database question: are you aware, that SQLite is a local database inside the app? On your server you are running most probably a MySQL database! And you already can access a MySQL database from within App Inventor, see here https://puravidaapps.com/mysql.php 

thanks, that's great. and for that push notifications I need it or is there any wokraround?


Ok I understand, but I want opposite - the places in my app (tehy're stored in database) would appear on google maps - that's all I need. The coordinates of my places are stored in that database and I want them to appear in that map based on taht coordinates ( maybe I'll save only the coordinates of that places in my app and photos and oher info'd be stored in google places) and as the map'd zoom out - the places'd cluster and as user'd zoom in the places'd appear separate.

Is THIS what you are looking for?

thanks, I've done that tutorial - but what I need is to display many locations at once - to be clear when user opens aplication - clicks on the button and google maps opens (that's done already). but I need to display places ( stored in the database) which are in the scope of the screen as the user zoom in/out it will display places accordingly. So basicaly app needs to check if the scope of the map changes and when it does it needs to 'calculate' which places are in the scope of the screen again. That database part is already done ( I'd do a partial dump of that DB based on tag= city,town,area) and it'll search trhu that dump if the place is on the screen. 
So all I need is : how to find if place is on the map( as the map is adjusting) and display it

Ok I'm switchin to java, anyway it'd be nice to include some unitized components for google API's mainly that most used related with geolocation, maps, places...


Error 2001 : file could not be found in your device

I  have created an app for an Android Samsung cell. The app allows you to choose between a photo or a video.
The app works correctly with photos.
With video clips I get the following: ERROR 2001 The file could no be found on your device.

do you use the Sharing component? currently you can't share videos with the Sharing component

refer to: search for Error 2001


Accessability for the Blind and Visually Impaired

Hi.  I'd like to make my app accessable for the blind and visually impaired.  How do I add description for Android's Talkback feature?


Talkback is described here:  https://support.google.com/accessibility/android/answer/6007100?hl=en  

 How to add descriptions is discussed here:  http://developer.android.com/guide/topics/ui/accessibility/apps.html  
in general terms, not specifically AI2.

Some of these activities might be accessible through ActivityStarter with AI2  and some, because they are evoked by xml might be controllable (there is a new xml tool in the Web component added just this past week (nr139) but at the moment, I have no Idea how.    It might not be possible to access these features through App Inventor 2.

You are going to have to experiment.    Be aware, MIT is in the process of adding API 4 capability to AI2 projects, at present it is at API 3; so all the functions of the latest  Talkback will not be accessible now in any case until API 4 is implemented.

This would be a neat feature.  You might ask this question of the MIT development team here:  https://groups.google.com/forum/#!forum/app-inventor-open-source-dev

All right, I'll wait.  Thanks.


Merging Scratch and MIT AI 2

I think it would be awesome if you could bring Scratch projects over to MIT AI 2 and vice versa. Obviously it wouldn't be able to be edited in quite the same way, but I really want a way to put my Scratch projects on Android. Am I alone in this? What do you think?


It's an interesting idea, but there are many, many things on the project plan ahead of something like this, so I wouldn't hold your breath.  It might be years before you see something like this.

For our App Inventor Tips, visit TwoDogApps.com


show a loading screen before displaying a page

is it possible to show a loading screen on my app when trying to display a web page so if the web page dosent come up i get a try again

Are you looking for a Progress Bar perhaps Korede?      See here AI2 Progress Bar   

What you may actually want is a screen1.ErrorOcccurured block  perhaps?    It is in the Screen controls.

or possibly a WebViewer.GoHome block   on a button if the page does not load that you point to an url?

I once prepared an example for App Inventor Classic here 
see also How to check Internet connection by Saj


Help Test the API4 Code in App Inventor.

Please help us test the API4 code. 
http://api4test.appinventor.mit.edu has just been updated to the latest release. It now also has the ability to set the width and height of objects as a percentage of their parent. This is useful in cases where you do not know the actual screen density and dimensions of the target device.

The source code for the test code is on my "api4jis" branch in my GitHub fork (jisqyv/appinventor-sources).

Nice start!

Here's a bug:

- create an app with a single button, set the screen to center the component horizontally, and set the button to center the text in the button.    Make the background of the button red.   Make the button width 20% of the screen width.

Look fine.
Now rotate the phone so the button is along the long side of the phone.   Looks great:  The button width expands.

Now rotate phone again.  The button and the red background are correct, but it leaves an extra block rectangle to the right of the red.

PS: I also found a more serious bug, but I can't reproduce it.  I'll work on that.

Shall we set up a google form for people to report  things?

Another bug:

Start wit an empty project.
Add a horizontal arrangement.  Make it's width 50%.

Place a label in the horizontal arrangement.  Make its background color red.

Change the label width from automatic to 20%

Rotate the screen and check the label width in both orientations.  It is the same in both orientations.
I played around more and am getting funny results, but I haven't done a careful protocol.   I'll do more later.

Also, if you try to set the label width to 200%, the error alert says:
The value must be a number greater than or equal to 0

Great enhancement.

I had a thought about the extra block WidthPercentage
Instead of adding the extra WidthPercent block it's possible to do this with the just Canvas.Width block and adding a new built-in maths block  % as shown below which I did earlier today

The reason I would do it like this is when using the coordinate system on Canvas component for drawing circles, lines, etc you'll need extra set of block. Using the maths percent block I have created means you could use the same block to draw a circle for instance and either use the maths percent number or just a number. Below is an example of what I mean

drawing a circle on the canvas using pixels (centrally on a canvas 320px by 480px)
drawing the same circle using the number percent block (centrally on the canvas)
This is only a thought which I have partially implemented already myself.

That percentage block needs a bit more thought, but it's nice idea.  

Thanks. The problem I am dealing with is that throughout the code lengths are represented by an integer. In the pre-API4 code, a positive value is a pixel count. -1 and -2 are special and indicate AUTOMATIC and FILL_PARENT. In the API4 code, positive values are now density independent pixels (aka "dp"s). In order to represent a percentage value, and still use a simple integer, I added a hack where the range -1100 through -1000 represent percentages (where -1100 is 100% and -1000 is 0%). These values are never returned (when you read the width or height of a component you will get the currently computed "dp" value). The WidthPercent and HeightPercent blocks simple convert their input into this range, thus hiding this ugliness from the App Inventor Programmer.

Actually, now that I think about it, You *can* input -1100 through -1000 via the normal Height and Width setters and the right thing will happen. So I guess we can create a percent block that just takes its input and moves it to this range. Hmmm. That might actually result in App Inventor code that looks cleaner. On the other hand, if people take the value of a percent block (my kind) they might be mystified by the weird negative values!


I was able to reproduce this one. Looks like a Android problem. I'm looking into how to get around it. I believe if I can trigger a complete screen redraw on rotation, that will deal with it...


Great.   Let me know when you've got a new version and then I'll do more testing.


Filter Bar in List View does not seem to work even with Selection...

I see a similar issue already reported which was in debate as how to implement it..
So, temporarily the suggestion was to use the 'Selection' instead of the 'Selection Index' and to handle any indexing internally... So far it was ok even though it is not acceptable.

Now with the new AI2 release it seems that it was also broken..
In the previous build suppose I have a list: A,B,C,D,E, and I enter B as my filter text and I select that B that comes as the 1st, it used to give an 'Selection Index' of 1 (not 2), but the Selection used to be 'B'.
But now in the new latest AI2, when I select B, it gives A as the 'Selection' and 1 as the 'Selection Inde'x. So, the Filter Bar is completely useless it seems now!
Do we have any alternative?

we already had a discussion about that here: Getting the true SelectionIndex when using the FilterBar in a ListPicker
currently you have to ignore the selection index if you use a filter in a listpicker or listview
as workaround you can use the listview selection together with the index in list block, but this works only, if there are no duplicates in the list...

btw. my jQuery Mobile workaround gives you the correct selection index back after filtering the list http://puravidaapps.com/listview.php
Another Listpicker alternative with App Inventor and jQuery Mobile including a Search Filter!


Problem with layout

Hi,guys! My problem is: when I open my app in my cell phone the layouts, that I got to set the components, to stop a visualisation of the image of breath.Does somebody know the reason? 
follow down my application

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.