2016년 12월 27일 화요일

When I click imageSprite, elsewhere it is clicked.


I created a Rubik Solver app.
When I press imageSprite, selected another next side imageSprite..
How can I solve this problem..
(When I click imageSprite17, selected left side imageSprite5 or up side imageSprite4).

I can not select the point that I want. Another is chosen..
So I also had to write dozens of code. ???


--
I created a Rubik Solver app.
When I press imageSprite, selected another next side imageSprite..
How can I solve this problem..
(When I click imageSprite17, selected left side imageSprite5 or up side imageSprite4).

I can not select the point that I want. Another is chosen..
So I also had to write dozens of code. ???

--
I don't understand what you are talking about.
Please focus on one issue.
Describe what you are doing, what you see and what you want to see instead.
Include pictures if possible.
I have looked at the project in the companion but don't know how it is supposed to work.
Provide as much detail in your description of the issue as possible.

--
Firstly I apologize for the bad english..

Sometimes I can not choose where I click.
Choose a different location.
because of this I Clicking the ImageSprite I forced down a little
There are some deviations.
Thank you. 
Necmettin.

(Turkish:
Öncelikle kötü ingilizcemden dolayı özür dilerim.

Bazen tıklamak istediğim yeri seçemiyorum.
Farklı bir yeri seçiyor.
Bu yüzden ben de imageSpriten'in biraz aşağısına tıklamak zorunda kalıyorum.
Biraz sapma var.
Teşekkürler.
Necmettin.)

 unnamed.png

-- 
Thanks for the video demonstration.
It was very helpful.
What I find is that if I don't touch in exactly the correct spot that either the color does not change or the wrong button changes color.
But if I am very careful to touch in the center of the button the colors change as expected.
This is on a phone with about a 3 inch by 5 inch screen.
So it is hard to touch in the correct spot unless you are careful.
It would be better to make the buttons larger, if possible.
That may require moving the colored circles.

-- 

How to store procedure in tinyDB?


At first I want to thank you all for helping me to understand coding.
With your help I made a very useful and cool app, for a company I'm working in.

Here is the machine I made. As you can see from the picture, it uses a touch screen
to controll the movements of those two cylindres at the front. I made the excactly the
same app in ai2. And it works very good so far. The appis there simply to record those
movements from cylindres and store them for later use. So the operater can just replay
operations in every day use.



















I simply made a procedure to store those values, and to play them back.

But here is the major problem. When machine turns off, all the data will be lost.

And I seek for some help online, and the best solution for this is tiny database.

I'm wondering is it possible to store procedure in tinyDB ?
 
My procedure looks like this: 



Basically it stores 2 values in arrangment to record user's inputs.
For ex. user inputs values, and saves them, so later he can playback those values.
Just like he would do on a simple piano keyboard recorder, where you can play some
notes, record them and later play them back.

I already made a save button, where operater can store operation and name it for later use. 

Anybody know how to do this. Maybe help me a little bit.

Here is aia of my code, so anyone who want to improve this, or
maybe want to learn something is free to use this code :D

http://www14.zippyshare.com/v/cR85ZoGF/file.html

--
Congrats on your work / app.

You'll have to provide a save functionality that gets the data from your your variables and then store them either as single key / value (TinyDB tag / value) or as list.
Then you also have to provide ability to retrieve those data either when the app starts (Screen1.Initialize).

-- 
It looks like you can save the lists times and notes (StoreValue) under two tag names in TinyDB.
When the app opens, you can retrieve (GetValue) the tag values into the times and notes lists before calling the pustiFalc1 procedure.
The question is how does the user change the contents of the times and notes lists before saving those changes in TinyDB.
Also, I don't know what the save1.Click block is saving ie. the Falc(n)Updown.Visible blocks are for what?

-- 
The user change contents of times and notes lists simply by pressing the buttons (if you have extra 2 minutes please download app from the link i provided above).
The block save1.Click is just saving a name of recording, so the user will know which one to replay later.
And Falc(n)Updown.Visible blocks are changing simply because there are 8 of them, and when I call one of them I need rest of all to disappear.
I simply made 8 completly similar things in order to create 8 recordings. I know that there is a better way to make this, but I'm mechanical engineer not a programmer.

It's a bit more complicated than it looks. I'm able to store notes, times and count in tiny db, but after that I'm not able to call them back in order to replay what I recorded.

Any other ideas?

Scott thank you for your time and efford. I really appreciate it. 

-- 
I think that you should study how TinyDB works with one of my example projects.
That would be easier than me having to try to understand how your app works and to debug it.
Then if you have a specific question regarding some TinyDB blocks that are not working correctly, you could come back here.
Try searching for other Youtube tutorials which use TinyDB.
Also see this chapter on databases which introduces TinyDB.

-- 

Set Canvas Background Image to Picture


I made an app and want to add one more screen that will show route picture which all week changes with new one. So I was thinking like set Canvas.BackgroundImage to "/Route/route.png" but I don't know how to do it correctly. I will replace the picture once a week foır changing canvas image. Canvas image will be like "/Route/route.png" and I will replace new picture route.png with the same name as you see. Do you have any idea to do it?

--
If gals are included:
Assuming that you do not want to distribute your app again every week, you need a place where from it would be possible to download your picture.
Look here at Taifun's example to download files: http://puravidaapps.com/filedownload.php

download.aia
downloadAuth.aia

Once you have downloaded it, you just set the images of the canvas to the downloaded file, probably it looks like set Canvas BackgroundImage to /sdcard/Route/route.png, assuming you have downloaded your image to Route/route.png

-- 

help on setting sound to retrive via path


so,i have a error 701 when i try to play a specific soundtrack,located in my downloads folder. i have made sure the directory was the same,and have added in the file:///mnt/sdcard/emulated/0/myfile.mp3,and yet it shows the aformentioned error.
so all it is suppsed to do is play the file that i have set it here,but it's not working. i would import the sound in,if not for the fact that this is for drama,and we have not chosen our sound for that particular section yet,aso,it's probably over the size limit for integrating into the program,thats why i have set this external directory.

screenshots provided.

 Untitled.png

--
this path file:///mnt/sdcard/emulated/0/myfile.mp3 does not exist

you should use the generic path file:///mnt/sdcard/myfile.mp3 which works for emulated sdcards and devices which have an sdcard

alternatively this path  file:///storage/emulated/0/myfile.mp3 should work on devices, which have an emulated sdcard

-- 
oh right,it's not sdcard,it's storage...
i'm an idiot,thanks for the reminder... 
:]
derp on my part. blame the beginner part of me.

but it's in the download file,do i also need to point at it,or will it just read it all to find the mp3?
i'm talking about the second option.
the first one also seems to not work.
here are the screenshots,from my phone.

 Screenshot_2016-04-29-00-53-47.jpg
 Screenshot_2016-04-29-00-57-53.jpg
 Screenshot_2016-04-29-00-58-27.jpg

-- 
try file:///mnt/sdcard/Download/backgroundcont.mp3

-- 
nope,practically the same error,but with that directory showing up instead.

-- 
is the mp3 file ok, i.e. did you try to play that file using another app?
did you try another mp3 file?
you also can try to prepare a very simple test example: in a button.click event just set the player.source to a mp3 file stored on your sdcard and then call Player.Start
does the simple example work?
you also can try to test my Jukebox example here https://puravidaapps.com/file.php

-- 
sorry,was asleep just now.
first question,yes.
second question,yes
third,no.
jukebox,just tested,seems to randomly find songs from my music folder,but that is where i kept my songs at... 
this is what i am trying now,and still failing...

now.png 표시 중

-- 
so i have somewhat given up on the direct directory method,and instead am trying the method here

works better,but still stuck.
at least no error 701,but here's the problem now.
the music files are gray,i.e. i cannot play,but going to the music section of the file manager app shows that as playable,but when i tap it,it just gives me the final responce, in the webpage's case,no pdf file selected, in mine,as i have changed the text,it says, select a sound file first,or something like this.
so thats the first problem,the second one is much more minor...will it play using the music app,or the in-built appone?

phone screenshots in about two-three hours,a bit busy for now,so just contemplate my fails here

 Untitled.png

 sketch-1461927696977.png

 sketch-1461932486162.png

 Screenshot_2016-04-29-18-47-31.jpg
-- 
the FileList block returns a list of filenames, the Player.Source block however expects a single filename and not a list
use Do it to find out the path to the file to use, then use that path and assign it to Player.Source
is the name of your folder Download or Downloads?
in case it is Downloads, the try this try file:///mnt/sdcard/Downloads/backgroundcont.mp3
how to use Do it see also tip 4 here

--
it's download. that was my fault,although since then,i have rectified that mistake.also,am using do it now,but i now get the old timey 701 error again,is that supposed to happen? don't think so.
and if it's supposed to have something show up in either the app,or in the coding webpage itself,it's not popping up.

-- 
it's download. that was my fault,
I guess, it's Download with capital D then...
the FileList block gives you a list of correct filenames, make sure, the directory name is correct.. . Download or Downloads or download is not the same...
you might want to provide a screenshot incl. Do it result...
then use one of these correct filenames and assign it to Player.Source

--
here u go!
 Untitled2.png

 Screenshot_2016-04-30-00-18-49.jpg
 Screenshot_2016-04-30-00-29-10.jpg
--
it seems to be you do not understand what I'm saying?
the FileList block returns a list of filenames, the Player.Source block however expects a single filename and not a list
which means, your blocks will not work like that
if you want to use these blocks, you have to additionally use a select item from list block together with index 1 (see arrow in screenshot) to get the first item from the list
alternatively try directly try /storage/emulated/0/Download/backgroundcont.mp3

-- 
ok, the alternative worked. thanks!

-- 
sorry for the late reply,but it works,and am now on a new project,albeit a very much similar one to this. i'm trying the http://puravidaapps.com/pick.php way of having it read a specific directory. it always just gives the final error,every time.

 Untitled.png

-- 
for new questions, please start a new thread
and concerning the old question, you might want to provide the solution, which worked for you in the end. thank you

-- 
fair point. i shall do that.

the way that i got it to work is so laughably simple,and yet,i was a complete and utter fool to not have figured it out earlier.
it will be better to just have the blocks shown to you all.
also,for reasons unbeknownst to me,i have removed the name of some blocks,some to protect the privacy of my fellow students,and some,for reasons,that i can't think of.

please note,the block says to find a mp3 file called backgroundcont.mp3 in the downloads file,so make sure your file is there in the first place,before you try anything.
also,just for lols,i will give you all a copy of the program,just throw in whatever sound track you need at according to the no.buttons, and rename them,then you can load it up for yourself!

you are also free to modify it to get the code more clean and stuff. i just cobbled this in roughly 4 hours,so you all get to see my possibly bad and therefore cause the appto react slightly slower than what it could have been with shorter code.

blocks (1).png 표시 중
Sound Control Soundboard.aia

-- 

Mistranslation by passing the application of Spanish to English.


I am developing an application with instructions in Spanish. When I choose to work in English I get an error in the Notifier. I take this opportunity to know if you are developing a Catalan version of App Inventor 2.

--
That picture alone does not give us enough information to understand what the error could be.   Please  give more detailed information and also attach your aia file so we can check it.

See you are welcome to start creating a Catalan version of App Inventor.   See Translation Of AppInventor

for information about translations
-- 



is mit app inventor think any future plan for editor base programming.


is mit app inventor think any future plan for editor base programming.

--
As far as I know: no. Later: maybe.
There have been attempts to create a textual language that could be used instead of blocks. For example look here: http://cs.wellesley.edu/~tinkerblocks/chadha-thesis.pdf

-- 

Renaming Recorded Audio


Usually when you use the recording component, the file name would be app_inventor_#########.3gp

Is there any way to rename the file using App Inventor? Or is there an option to name it before saving the file?

--
use the SavedRecording property, see also the documentation http://ai2.appinventor.mit.edu/reference/components/media.html#SoundRecorder


SavedRecording
Specifies the path to the file where the recording should be stored. If this proprety is the empty string, then starting a recording will create a file in an appropriate location. If the property is not the empty string, it should specify a complete path to a file in an existing directory, including a file name with the extension .3gp.

-- 

Can't connect Samsung J5


I have a new Windows 10 PC on a wifi network and a new Samsung J5 phone connected to that network.
On Companion on the J5 I get "Error: No wifi connection." Version 2.36.
Any help appreciated.

--
and 

Troubleshooting:

If your app does not appear on your device, the most likely problems are:
⦁ You may have an outdated version of the AppInventor Companion App. Download the latest Companion App for App Inventor 2 from above.
⦁ Your device may not be connected to wifi. Make sure you see an IP address at the bottom of the AICompanion App screen on your phone or tablet.
⦁ Your device may not be connected to the same wifi network as your computer. Make sure both devices are connected to the same wifi network name.
⦁ Your school or organization may have network protocols in place such that the wifi connection is not allowed. If this is the case, you can still use the emulator or you can use a USB cable to connect your device. Go back back the main setup page for these options.

Connecting the phone over wifi

I'm using wireless and the phone won't connect to the blocks editor.
Try the following steps to troubleshoot your wireless connection.
1. Try to reach http://rendezvous.appinventor.mit.edu from your computer.
2. Try to reach http://rendezvous.appinventor.mit.edu from the phone itself.
3. If the steps above both work, try using the "ping" command to ping to the IP Address of the phone (displayed by the MIT AICompanion in its startup window). If you are using windows, type "ping" + *IP address of the phone* in cmd.exe window, if you are using mac or linux, type type "ping" + *IP address of the phone* in terminal window. Detailed instruction see http://www.wikihow.com/Ping-an-IP-Address
4.  If all of these steps succeed and Wireless AppInventor *still* doesn't work, then there may be a firewall between the computer and phone that is blocking ports 8001 and 9987. If you have a "telnet" program you can attempt to telnet from the computer to the phone on these ports. If the connection won't complete, then there is likely a firewall in place that is blocking connections to the phone.
I installed the MIT AICompanion App before and it doesn't work now.
You must use the latest version of the MIT AICompanion App. If you attempt to use an older version of the Companion App with App Inventor, you will be prompted to update it.
I followed all the wireless instructions and my phone is connected to wifi, and I still cannot connect to AppInventor via wifi.
If you have trouble connecting using these wireless instructions, make sure your phone is using WiFi and not the cell network. On some devices and in some locations, even with WiFi enabled, the phone continues to use the cell network for Internet connectivity. If this is happening to you, you can disable mobile networking (cell phone carrier based Internet connectivity) from your device's Android settings menu. More information about how the wifi connection works.
-- 

App with cloud to insert images from remote control


Hi guys, is there any tutorial/video or something that can explain how to create an app with images and i should control this images remotely. 

Example: 
The app is on the mobiles of users and, without the need to re-install or update the app, every day i can add new images and users can see them, A kind of "daily remote update"..

--
store your images somewhere in the internet, for example your web server or your Google Drive.
In your app then use the image component together with the link to the image

-- 

Background services into App Inventor


Is there any way to open APP when phone is shaked etc using background services? , I saw other same thread in the group says background services are in progress in couple of weeks, wanted to know if this is available ?

--
Where did you see it? It would be great!

-- 

to make a simple multiplication game


to make a simple multiplication game i made that
(look pictures)
but i know that is not eneugh.
can some one help me?
blocks.png 표시 중
1.jpg 표시 중

--
Create a variable called Product and set it to b1 * b2.
Then compare Product to result.Text that the user typed in.
If they are equal set the color to green else red.

-- 
thanks a lot Mr.ScottFerguson 
i tried something like that. (look picture) .and it works .
m.png 표시 중
--

Pizza Party with Fusion Tables for App Inventor 2 UPDATE BUTTON


Hello mr Taifun or other expert, can you help me with my project? I want to edit the pizza party with the fusion table to have UPDATE button where when if i click the button, the specific row id in fushion table will updated with new data. 

--
For UPDATE statements the first step to be done is to get the ROWID of the row to be updated with a SELECT statement. The second step is to do the UPDATE.

This example https://puravidaapps.com/fusionDB.php uses the web component and OAuth instead of the built-in fusiontable controls. But you could adjust it to your needs

-- 
Thank you so much because reply my msg. Actually i have look the example you give before (https://puravidaapps.com/fusionDB.php) but i cannot understand anything because i am totally newbie with the programming thing. i do not have any basic. I just download the source (aia pizza party) and try to change it a bit. can you help me to make block template so i can edit it. i want to change the submit button to UPDATE button so it can update specific row of my fusion table if certain category on item picker is choosen without add new row. please help me.




--
the Screen1.Initialize block you can find in the Screen1 drawer 

 i cannot understand anything because i am totally newbie with the programming thing. i do not have any basic. 



A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
Top 5 Tips: How to learn App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

-- 
From your drawings, I think you have not done any tutorial(s) yet, or watched any of the very nice YouTube videos showing people building apps.
See the Books and Tutorials section of this FAQ ...

-- 
I have try pizza party tutorial and it was a success. now I try to edit it a little bit to have SELECT command using list-picker. I faced an error now.

can you help me figure out what is my problem? here the screenshot of my block and my fusion table:

  

-- 
Your SELECT statement asks for only one column but you try to extract more than one column from what came back from the SELECT.

-- 

there are 3 errors in your blocks
1. space is missing
2. another space is missing
3. this is not a rowid, you should use the rowid you received previously using the SELECT statement


-- 
thank you taifun. i have edit it now i faced new error like this. 



-- 
it seems to be, there are two single quotes after pembaris?

It would really help if you provided a screenshot of your relevant blocks including Do it result of your SQL statement, so we can see what you are trying to do, and where the problem may be.
see also 

Frequently Made Errors with Fusiontables and how to fix them

-- 



Thank you again taifun. i have fix it and every thing is okay now. I able to select from listpicker, then i also abe to update the fusion table. but when i click update button i face this erroe. when i check in fusion table the data have been updated. i check all my blocks especially the select and the list everything should be okay. i cannot shows my doit result because emulator or companion cannot being used on this pc. so i have attach my .aia file here. please anybody help me because the due date is very soon to submit this project. this also my relevant blocks and my error screenshot:

-- 

but when i click update button i face this erroe
remember: the fusiontable control got result event will be executed after sending the select statement AND after sending the update statement
and after sending the update statement you do not like to call your list procedure anymore...
use a global variable action and set it before executing one of the statements, thein in the fusiontabel control got result event check that variable like this

if action = SELECT
then call list procedure
else do something after the update

-- 
Than you taifun. I not understad much but i just add fusiontable control 2 to the update statement. My project is okay noow. Thanks you so much again.

--