2017년 1월 12일 목요일

camera function


HI DEAR HOW TO SAVE TEXT INTO EXCEL. For Example i tack any pic and that times i save pic no.....

defult pic rename is aaa123 and i change into 123 in android apk.... And that No is save in csv.

--
There is a File component where you can save csv tables built from lists of lists.
You would need a file transfer app like Dropbox to get it to Excel on another machine.


You can also upload text and picture numbers to a two column Fusion Table, using INSERTs, and ask the Fusion Tables web site to download the table as a csv file.

There is also a technique to load data into Google Sheets, which you can find somewhere in this FAQ ...

--
defult pic rename is aaa123 and i change into 123 in android apk.... And that No is save in csv.
you can't rename a picture taken with the camera component using the built-in blocks of MIT App Inventor, but you can do it using my file extension https://puravidaapps.com/file.php

The App Inventor Extensions are currently in testing. See the announcement for more information about how to use an App Inventor Extension. 

-- 

Writing code in text rather than using blocks


Hi, I was just wondering if it's possible to bypass the blocks and actually write code in text.
I am required to use app inventor for a class, and have some java and js experience from computer science classes,
but now im in a non-programming engineering class and have been told to write an app using app inventor. I want to be able to access the screens properties and such that i see on the block screen, but without having to drag in blocks all the time. If it isnt possible online, is there a way to export it to android studio so I can perform that?
Thanks!

--
, I was just wondering if it's possible to bypass the blocks and actually write code in text.
unfortunately that's not possible

-- 
There is also Typeblocking ...:

-- 

emulator.exe non found


Im am using Windows 10 Home 64 bit (Italian).
After launching aistarter.exe on the desktop the dos command prompt appears normally showing the starting 5 lines and the last one says CTRL C to quit.
When i try to connect from http://ai2.appinventor.mit.edu/ It doesn't find the emulator (It says to launch the emulator).
When I close the dos prompt during shutdown It says emulator.exe not found.

--
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.
-- 

I think there should be these blocks


There are 1/tag , 1/sen , 1/cos   simpler >> acot , acsec , asec 

in the "and" block , one should be able to add more spaces not more "and " blocks , the same for the "or" block 

When you right-click there must be appear the "text" and "number" blocks in order to make it fast 

the textbox-margin should have a color-margin function.

The backpack should be saved , or procedures should be saved with names..

--
I think there could be ability to hide virtual keys (I have Sony Xperia M with virtual keys), so app will be fullscreen. Srry for my bad english and if I posted my message in wrong place, then sorry, im new in this Google Groups.

-- 
you could write your own extension and create a block yourself...

more information about how to create an extension see here Announcing App Inventor Extension Components
however that will be more advanced and will require some Java skills...

--
app
my tools extension now offers this functionality, see here https://puravidaapps.com/tools.php


-- 

is there any way to download apk more than 10 MB


well. i spent a long time to make an application .but it must be more then 10 MB
. i make a few screens. but i need lot of pictures and sounds. i choose a small format for both images and photos . but the app really need more then 10 MB. and i can t download it now.
is there any way to download it?

--
thank you so much. i choose to use do that by AppToMarket-v40  

(download the .apk to your computer
Using AppToMarket, tab2, button 1, decompile your .apk
This will create a subfolder called temp_myDecompiles\assets
Goto above subfolder and drop all your media files - You can also overwrite the images with higher quality images
Then in AppToMarket, use button3 to re-package your app

but when i try to opn AppToMarket-v40 i have this message (look image down)

--
for questions about AppToMarket, please ask in the AppToMarket forum


-- 

I have finished an app and I can't install it in my smatphone. What can I do?


I have created several applications in App Inventor 2. One of them, if I could install it on the mobile. However, two other similar ones I can not since I get that the package installer has been blocked. What I can do?

--
probably not enough memory on your device?
can you provide a screenshot of the error message?

-- 

MIT app inventor version


I try to use MIT app inventor offline , is this possible?

--
Please use the search box on top of this forum page to search before starting a thread. There's a lot of user who asked these common questions before and the answers are always the same.

These are the results of searching for  "App Inventoroffline"
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!searchin/mitappinventortest/app$20inventor$20offline

--

app inventor offline


Re: creating offline maps with MOBAC and getting them running with app inventor ?

If MOBAC provides the latitude/longitude coordinates for the lower left and upper right or the map (or vice-versa ) you can do this. If the map projection ...
14. 7. 23. 작성자: SteveJG - 작성자 3명의 게시물 8개 312회 조회

Re: [mitappinv] Re: Can I Choose a custom font for my app?

You can look at the offline version: http://amerkashi.wordpress.com/2013/07/12/ offline-app-inventor-custom-font-face/. -Hossein. On Fri, Jan 3, 2014 at ...
14. 1. 4. 작성자: Hossein Amerkashi - 작성자 3명의 게시물 4개 656회 조회

Use App Inventor without Internet connection.

I'm starting a program in a public school in Brazil to teach high school girls to develop apps using App Inventor. However the school does not have Internet ... Is there a way we can use App Inventor offline? Any idea will be very much ...
14. 3. 11. 작성자: Juliana Freitag Borin - 작성자 3명의 게시물 3개 318회 조회

Re: time delay in operating app inventor please help.

Hi, i have the same problem and i am using Chrome. I tried to use AI2U (App Inventor offline) but the time response still the same. I have un aplication ...
14. 3. 12. 작성자: Marcus V. Salles - 작성자 4명의 게시물 8개 486회 조회

App Inventor Offline version causes error 404.

Hi,. I was tried the offline version of aiStarter and when i start it giving an error. and 1 more think , do you think that online version is much better then ...
14. 8. 1. 작성자: Jeevanjot Singh - 작성자 2명의 게시물 5개 2943회 조회

Re: How to Add .pdf file in app inventor?

... possible to host a txt .doc file at least!!!... because i don't want my app to interact with internet in any way!!!! i wanted my app to be completely offline.
14. 7. 8. 작성자: Chetan Kulkarni - 작성자 2명의 게시물 11개 404회 조회

Re: AI2 too slow. Project too big?

PS : I tried also to use the "offline" version without succsess ! ... MIT App Inventor 2. - Windows 7 and Windows XP. - Chrome version 32, Firefox 25. I am working on an app (runchallenge) which seems to be too big, actually it has 10 ...
14. 3. 21. 작성자: Christian Feniou - 작성자 12명의 게시물 54개 1197회 조회

Re: How to combine tinydb and tinywebdb?

if you go offline with the app (meaning no internet on the phone), the values and tags do not load. this is understandable since the tinywebdb needs ...
14. 7. 28. 작성자: solidg...@gmail.com - 작성자 5명의 게시물 36개 467회 조회

Re: App crashed on MIT app inventor 2.

I've already published app in market and now need to update it. how can I open my project? Offline ai2 is not responding too. Please guide me. Vipul.
14. 6. 9. 작성자: Vipul Chaudhary - 작성자 6명의 게시물 28개 663회 조회

Frequently Asked Questions (FAQ)

Welcome to the App Inventor 2 Power Users FAQ Frequently Asked Questions about programming in MIT App Inventor 2, and answers to those questions .... Offline unendorsed versions of AI2Multi-touch in AI2UTF-8 Encoding Generate your own BOMVideos Large videosHow to play videos Waiting and ...
1월 11일 작성자: Abraham Getzler - 작성자 1명의 게시물 1개 3108회 조회

Screen.Height and Screen.Width bug?


I am in need of changing location of components in my app depending on the screen orientation. It seems to be an easy task, but I had been struggling for hours. I think I finally confirm that it is indeed a bug. I have attached a screenshot of the code to demonstrate. 

The basic idea is that if Screen.Height > Screen.Width, then it's in portrait mode. It reports fine "when Screen.Initialize", but reported just the opposite orientation in "when Screen.ScreenOrientationChanged" - and it seems that the Height and Width are not set correctly, unless of course if I miss something.

If any can confirms that I am not missing anything, and it's indeed a bug, please let me know how to report this.

--
There's a delay between the physical orientation change and the reporting. It's not really a bug, but it's not a good thing either.
What we usually do is create a clock and enable it when the orientation changes. That clock is set to half second, 500 ms  (or whatever works for you).
Inside the Clock.Timer event, by now you should have the width and height values updated, so do what you have to do when the orientation changes. This gives half second to the app to receive the new orientation and be able to report it correctly.
I hope it works for you.

-- 
Thank you, Italo - your suggestion works perfectly. I have attached the sample code with your suggestion for the benefit other users.

However, I believe it should be considered as a bug and being addressed - I mean "when Screen .ScreenOrientationChanged" event should only be fired when Screen.Width and Screen.Height are updated - in this case, approximately 500 msec. after it is fired right now. Otherwise, all the users will have to have the timer added (as you suggested) in order to get an accurate reading of Screen.Width and Screen.Height. 

Thanks again Italo for your quick reply with a simple solution.

AI2_Screen_Width_Height_Bug (Fix).PNG 표시 중

-- 

After screen rotation. How long to up date element size properties?


I have a canvas set to fill width. On screen rotation I get the canvas width and calculate the maximum x coordinate.
I am finding that the canvas width property is not updated straight away and canvas.width returns the pre-rotate value. Is there a way around this?

In the attached blocks. When the screen is rotated, I recalculate Graph_maxPos based on the canvas.width. 
Graph_maxPos is the maximum x coordinate in the graph.

If I wait a short while after the rotation and use the start button to reset the graph everything works fine.

screen.jpg 표시 중
--
What you can do, is to enable a clock at screen rotation, and calculate the new values when it fires the first time (then disable the clock again). Experiment with the timer values for the shortest reasonable value.

-- 
this is what I done and the same method I used to over come a similar issue when updating button graphics. I feel it is a little messy having to used timers though.
Is this type of problem inherent in Android or is it just AI?

-- 
It is just AI that is not so fast. It may well be that when you build the app that you do not have the problem, because of less overhead.

--
thanks

-- 

Notifier


Trying to make it so when the user clicks on the first text box or list picker it will tell them that they have to pick what they want first then pick where they want the text to go, would the notifier be what I use for this and if so, how would I go about this?

--
 unnamed.png
This seems right.....

-- 


Help me fora puzzle solving game


I'm trying to make a puzzle solving game but i don't know how to store the puzzle so it can be selected when you want to challenge a friend with it. How do i do this?

--
You probably need to use TinyWebDB.
However, you need to show what you already have done.
Also, do the AI tutorials.

-- 

How to create a textbox with choices based on what the user wrote ?


I would like to create a textbox which when a user write something, different choices appear based on what he wrote.
Could you help me please ?
Thank you very much.

--
You can do if textbox.text = (what user types in)

then set label.text (Which are the choices) to (what you want) and you can do that for however many choices you want

-- 
Possibly you need to create a list; to contain keywords; like a dictionary. Keep them all as lowercase.
Then when user enters the text; you need to lowercase it and extract words from it. 
Then look it up in your dictionary list and if found, then possibly lookup the index on another synched list

-- 

quizCreationTool


I would like to make a quiz creator tool.  Any ideas?

--
Yes, search the forum and the tutorials.

-- 
Check the AI tutorials AND also the quiz app here.
QuizMe_MIT.aia

-- 
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 AppInventor, 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.

-- 

FUSION TABLE for signup




I'm using the fusion table for my sign up screen. I tried to do the same as the pizzaparty tutorial but it doesn't  work :( Please help me I have to finish this as soon as possible.

--
what exactly does not work? any error message?
-- 

Run Time Error in App


Hi, we're experiencing a runtime error and we want to know if changing the file size of the images would fix this.

Attached is an image of our blocks and the error we are encountering on our device when downloaded as an apk.
Screenshot_2016-04-16-10-15-31.png 표시 중

--
-- 

Up Down bottons


I'd like to add my app two buttons (Up, Down) in order to set the value of a variable x . The behavior should be:

1. while Up is TouchDown, increment x by 1 (x++) every 500ms
2. while Down is TouchDown, decrement x by 1 (x- -) every 500ms

I'm a beginner at App Inventor, and have no idea about what structure is needed in order to realize this apparently simple behave... Can somebody kindly give me some hints?

--
--
thank you for this complete configuration! I tried, and works perfecly :)  I have just one question: why do you enable the Timer of Clock1 only when a button is pressed? It seems more simple leaving the Timer always enabled and, when buttons TouchUp, set Button_pressed to " ". Sorry if my names are different from yours!


--
Well, it's just the way it came to my mind at the time. Your idea is really good.
Usually I leave only the processes that are essential for the app to run and turn off whatever is not necessary. 
In this case, it's OK to leave the clock running, but if you have an app with a lot of things moving at the same time, it's better to keep the amount of processes running to the minimum. Especially in App Inventor 2.

--
Another thing that just came to my mind. With my method, the amount of time since you press the button until the global is increased or decreased is the same, but if you leave the timer running, you never get the same time.

--
thank you for your replies Italo; your considerations and suggestions are very usefull for my app, expecially the one about saving computational resources.

--

Increase and Decrement Value of Variable with Button.LongClick


I am trying to increment/decrement the value of a variable using LongClick. There are two separate buttons for increment/decrement. The purpose is to increment/decrement as long as the relevant button is pressed. After the increment/decrement is done, the value is sent via Bluetooth. But I am unable to increment/decrement with the long button press. Can anyone help me with the logic on how to do it? 

--
This previous post will help you understand how to do it using a clock.


-- 
Thanks a lot Italo :) It helped a lot :) I'm finally able to increment and decrement a value using LongClick. Yeah! :D :) 

-- 


URGENT USE THE SAME TINYDB FROM 2 DIFFERENT APPS


the tinydb database isn't common for all applications? I mean that if i store values at the database with one application is it possible to see them with another one? 

--
see the documentation: Storage - App Inventor for Android

Each app has its own data store. There is only one data store per app. Even if you have multiple TinyDB components, they will use the same data store. To get the effect of separate stores, use different keys. You cannot use the TinyDB to pass data between two different apps on the phone, although you can use the TinyDB to share data between the different screens of a multi-screen app.

When you are developing apps using the AI Companion, all the apps using that Companion will share the same TinyDB. That sharing will disappear once the apps are packaged and installed on the phone. During development you should be careful to clear the Companion app's data each time you start working on a new app.

-- 

Problem with image sprite setup for horizontal scrolling


I've been attempting to setup horizontal loop scrolling with a linear stack of small imagesprites. On screen init. the sprites don't line up to where they are suppose to? Can someone please help me see what I'm missing?

Instead of using black vertical image buffers to cover the swapping within the screenview I've added the width of the scrolling image sprite to the left and to the right of the canvas. The mechanics would ideally be that a line of 4 or 5 (could be more) chained blocks continually scrolls through the screen and the image sprites swap from the left unseen side to the right unseen side. I'm trying this idea instead of making a huge canvas (x2-x4 size) to attempt for better performance. 

I added 3 ball sprites colored in sequence like a traffic light as canvas landmarks (see attach). Red ball marks the unseen start of the canvas, yellow ball marks the start of the screen and the green ball marks (supposed to) the end of the screen and the start of the unseen canvas area on the right side. The 3 green ball sprite does not go to the desired place on screen init either. 

I've been encountering a glitch, it seems that every third sprite or higher I try to setup init coordinates for does not go to its desired spot on screen init. Third ball sprite or image sprites 3 and 4 don't go to their spots, but manually right clicking and choosing "Do it" command on their block logic puts them right where they are supposed to be.

For ease of testing:
- I have setup the scroll clock to turn on or off on canvas tap. 
- I've setup the screen alignment to switch through its 3 settings on canvas swipe so its easy to see where the image sprites are at any given point

PS. still need to work on eliminating the gaps between the image sprites when they swap. Tips would be appreciated but it's not a priority, more worried about the right setup on initiation first :)
Thanks for the help and the amazing community this program enjoys

cloud scrolling.png 표시 중
Screenshot_20160405-132819.png 표시 중

--
I usually am required to use a clock timer to resize the canvas with blocks.
Here is  how you can do it for your project:
Once the canvas is the correct size, only then can you set postions of sprites.

--
I see! Thank you so much. So screen init does not effectively resize the canvas and must be set individually with a clock in it's own step. I will be applying the principle and thank you.
  Also thank you for the comment explaining the purpose and use of the math block "floor". In spite of the definitions provided by app inventors help section I have a difficult time understanding this block and other blocks like modulo that I see used around for animation or placement purposes.
   I think I finally see why sometimes using a sine fx to increase and reduce the size of a sprite (different practice exercise) was acting buggy on me. Without the floor block I was getting decimals of pixels of target sprite size which must have not been registering like you suggest the canvas needs.
   I'm assuming it's safe to say in layman terms that the floor block rounds down to the closest whole number

--
 I'm assuming it's safe to say in layman terms that the floor block rounds down to the closest whole number


floor really just truncates a number at the decimal point:

floor(4.9) -> 4

Of interest also is MITAI's method of rounding.
It uses round-to-even which means that if a decimal is exactly N.5 then if N is odd it rounds down, if even it rounds up!

round(4.5) -> 5
round(7.5) -> 7

Why?
Because that method when used with a large set of values gives a better average result than always rounding down.
But it is a bit confusing.

--
Understood! Thank you for taking the time to explain it. I appreciate every bit of knowledge on math and coding principles to improve my animation skills :)

-- 


Designing a CANVAS app or game using INKSCAPE (Video tutorial)


I have a new Tutorial for App Inventor!
It is similar to the previous one using INKSCAPE but this time we will be using CANVAS! I really like this one because it is easy to create interfaces in the canvas and you can have very attractive designs in APP inventor! I write the description of the video and at the end the link to watch it:
"In this  tutorial I will show you how to design a Canvas App or game using the super software #INKSCAPE and then passing all the information to APP Inventor and best of all, perfect scaling and positioning.
In tutorial number one we will see how to position and scale sprites in the app inventor canvas app just like we designed in INKSCAPE. You can combine static and woderful Backgrounds with good looking sprites
And wait for part 2 because we will make a very cool "game" in the canvas and just using the concepts from this video, inkscape,GIMP and app inventor!  so  practice a lot to be ready guys! Happy App Inventing!
Why should I  design my app using Inkscape?
° Powerful open source tool to create nice designs for backgrounds and also for interactive stuff like buttons or sprites! 
° Inkscape helps you see the final look of your app in all the devices.
° Valueable information from INKSCAPE (Scale, x and y coordinates, colors etc) that will make you app designing easier
° Your app will look great! Sometimes app inventor apps work great but sometimes they look a little bit "plain", with Inkscape you can make them look more profesional.
° There are a lot of INKSCAPE tutorials
° Bla bla bla! jaja have fun"



--
thank you! keep up the good work!

--
Very nice tutorial.

-- 

Sending email with attachment


I have following problem:

I need to send email with attachment to several pre-populated email addresses (addresses are stored in text field). So far I manage to do this:

using activity starter I can send email to desired addresses (mailto) but without attachment
using sharing component I can send attachment with email client but cannot autopopulate field To

And ideas?

--
See Taifun's post HERE for different email solutions.

-- 
I have seen it before but none of it fit my needs. I want to have .apk without any extra php scripts on server. So question is: can I put attachment in mail and autopopulate field To: with email addresses in text field (by using activity starter or sharing component).

-- 
on the mentioned page 
Different eMail solutions for App Inventor 
there is not only the php solution, there are several solutions available, what about using the IFTTT solution?
-- 
I know, but if possible I would like to use only apk with default email client (so no need to install other software on the phone). Believe me, I read and tried everything that you mentioned. 
In short, can I achieve this: prepare e-mail adresses and location of the file in apk (put it in the text fields), than send email to that addresses with that file in attachment. Sorry if I'm boring.

-- 

In short, can I achieve this: prepare e-mail adresses and location of the file in apk (put it in the text fields), than send email to that addresses with that file in attachment

yes you can, just use the IFTTT solution


I would like to use only apk with default email client (so no need to install other software on the phone). Believe me, I read and tried everything that you mentioned. 

well, in this case you already found out yourself, that you do not have to install any other software on your device using the IFTTT solution...



-- 
Hmm, in the explanation about IFTTT stays: "To send an attachment, first upload your attachment to the internet". The idea is to send file that is on the sd card as attachment without need for uploading to the internet. Is it possible to add attachment in mailto (like e-mail addresses, subject and body) via activity starter.

-- 

 Is it possible to add attachment in mailto (like e-mail addresses, subject and body) via activity starter.

unfortunately not

-- 
OK. Thanks. I'll try something else.

--