2016년 12월 16일 금요일

Can't upload video


Using: Windows 10

When i upload a video so it's say Error: Uploading Failed. It's nothing wrong on my internet. Why i can't upload video?

--
Are you uploading a video during design of the app (e.g. as an asset) or when the app is running?

Where are you uploading it to?

Any restrictions form the location it is coming from?

What size is the video?

Screenshots of blocks might help in both aspects :)

More information needed :)

-- 
I can tell 2 information here:

The file is 68 MB

And it's filtype is video

-- 

How to overcome the App Inventor project limit of 10 MB

--
 Why not provide more information about what your are doing? Can't help without that ?

-- 

How to overcome the App Inventor project limit of 10 MB


-- 
Why not provide more information about what your are doing? Can't help without that ?


-- 
Oh, okay! So why i can only upload from 10 MB?


-- 
Okay. I checked you link and it's so hard to made that!


--


I have a question aboput a icon..


I Have crate my first app here and i wounder how i can get an icon on my phone up in the left corner when the app is running. It is possible?
And how can i make it? Please help...

One other thing, When I press back botton on my phone (Not in the app) My app close... how can i fix that?

Best Regards

Radio GTT

-- 
1) upload an icon (48x48px) into App Inventor and set it in Screen1 as icon property

2) drag an empty Screen.BackPressed event to the working area

-- 
I remember the name now.... Statusbar on my phone when i have open the app.... Almost notifi you have on your facebook app when some one has send somthing to you... So when i start my player i will have an icon on my status bar on my phone so i can se i have the app upp and running...

--
And can i set so the app minimise insted?

-- 


Fill labels with a query from Mysql database


Using this Mysql tutorial i can read and write from my mysql database.

I've a problem.

I can read all the fields of a row of a database and put them in a single lable using the "code" in attachment

I want that when i click on Btnview i can see the Field Nome in Name.Text lable Field Cognome in Surname.Text lable and so on..

Is it possible? and can you give me an example or some suggestion how to do that?

I attach also the structure of my db 

db.png 표시 중

structure.png 표시 중

-- 
In the for each sublist in list2 section,
put a series of blocks like
set label1.Text to select item 1 from sublist
set label2.Text to select item 2 from sublist
...

(adjust label names to taste).

-- 
i don't know how to reproduce what you suggested me (sorry) 

i post the screen 
test.png 표시 중
-- 
See 
➠ the many examples in the Web Services section  
for how to pick out pieces of text from a Web query response.

-- 
searching in your link but cannot find.

Can you give me a more specific link or give me snipset of example?

-- 
First post an image of the Web response text that is being parsed.

-- 
don't know if i'm answering to your question :)
PARSE.png 표시 중

-- 
You did not answer the question.
The response from the Web can't be parsed properly with out sample data directly 
copied into a global variable from the responseContent  in the Web1.GotText event.

Not from some muddied field too far downstream.

-- 
i think now i've solved.

see attachment image. With DO IT from ai2 seems ok the value
ok.png 표시 중

-- 
Works fine if i use only 8 rows of the database!

if i use more then 8 i recieve the error as in screenshot

Screenshot_.jpg 표시 중

ffff.png 표시 중

-- 
Insufficient information to debug.
Show the Web response text before parsing .

--
Select list item: Attempt to get item number 9 of a list of length 8: (2 8053921 name surname SI SI SI SI)
Note: You will not see another error reported for 5 seconds.


in attachment aia file

-- 

Select list item: Attempt to get item number 9 of a list of length 8: (2 8053921 name surname SI SI SI SI)
Note: You will not see another error reported for 5 seconds.


You took a long walk on a short pier.

Your table only has 8 columns, but you tried to select past the 8th and last element of the list that came back from a SELECT.

Either get a table with 12 columns or test your list length before stepping off the end.

-- 
No the table has more than 8 columns.

And this is the reason why i cannot understand the error!

--

learn how to debug your blocks... in App Inventor just use Do it, see also tip 4 here
-- 
Every data base system has a facility to dump its contents, in some readable form.

Post a dump of your data base here.

Investigation requires data.

-- 
i found that if the field is empty i recieve the error while if i put a charachter in each field (for example a - or whatever ) i can read all data and don't recieve any error!

Why if the field is empty i have error?

-- 
The answer to your question lies in how the incoming message in the Web1 responseContent looks, before you
grind it up with csv conversion.

You haven't shown us that.

Many database systems have a field-level DEFAULT value option, where a column in a table will always have a user-specified default value assigned instead of a NULL value.
That might let you work around the problem.
You might have to go back and clean up the rows with the empty fields,
or patch the upstream program feeding the data base to insert user-defined app-specific defaults 

-- 
For a quick easy experiment, try SELECTing a 13 column as a literal number, for example
SELECT F1,F2,....,F11,F12,1 FROM tablename
Then run it thru csv conversion, and count the length of the list.

Adding a 13th field (the "1") to the result might force the dbms to supply commas for the missing fields, to get the 13th value in the right slot.

-- 
So i've to do a select with real names of columns of database, for example
Select name, surname, g1, g2, etc and at the end ,1 from elencocuriosi ?

I'll try and let you know

--

See attached Do It.

csv_wierdness.PNG 표시 중


-- 

The stranger thing is that now i've filled all empty-strings with a "-" but i recieve the same error!!

Becoming crazy :D


-- 

now i've filled all empty-strings with a "-" but i recieve the same error!!

Do the dump again, and look for old records you missed, that are still short from before.

-- 
You were right! :)


-- 

How to SELECT the most used item in a Fusion Tables Column ?


Thanks to Taifun and Hossein, I choosed to use the fusion tables to make my form with AI2.
It's now working perfectly !
But I still have an issue, I want to offer the possibility to the users some statistics.
Let's say that each user have to say wich city he prefer, he have the choice betwen 100 cities.
Once he choose, I want to tell him what is the most popular city.

How can I write my query to get the most used answer ?

Also, let's say that after choosing my city, I can choose bettwen 3 other criteria.

How do I write my query to the city that have the most 1st or 2nd or 3rd criteria ?

Thank you very much, very appreciate.
Looking for answer since 2 days :(

-- 
use group by, see this similar solution http://stackoverflow.com/a/2722426/1545993

-- 
You will need to keep a separate survey response table, in addition to your table of cities.
The Fusion Table Merge facility can be set up to match by city name, though it is tricky.

-- 
Thanks again for your useful information.
Will dig into this and post screenshot once it's working for future request.

-- 
As you can see, it's working ! 
In the screenshot, you can see the result : 

- The selection the largest number of answer is "Ligne RER B" with 4 votes.

New issue, I can't use the query result as it is. Question is : How only keep "Ligne RER B" ?

Sans titre.png 표시 중

-- 
Your query result text can be used as a csv table, with the appropriate csv conversion block.
Your answer is in column 2 of row 2.
Use the SELECT block, twice.

-- 
Thx for your answer. After reviewing all the sql formating query result, it was my Guess.
Unfortunetly I'm not confortable at all with list, csv ...
Can you help me à little bit more on how to do it ?

--
-- 
When i use " from csv table to list",
It return only the 2nd Line, but then how isolate only "Ligne RER B".

Any suggestion ?

--
split at comma if you got a text line with a comma, then select the 2nd element.
Show us your blocks  and the Do It values.

-- 
I drop the CSV idea and use the Split fonction.
I split the first time with \n to choose the second line and a second time with comma to choose the second item.
I can probably do it better, but it 's actually doing the job.
If you have any idea to improve the code, you're welcome ! :)
Sans titre.png 표시 중


-- 
set global result to list from csv table get result
set Label1.Text to select list item list= (select list item list=get global result, index=2) index=2)




--