2016년 12월 20일 화요일

Is it possible to build an App that fits the description below? I'm a newbie to App Inventor


Hi all and particularly App Inventor experts,

I am looking to build an App that will allow certain functions;

Log a variety of events by position, by category,  onto a preloaded satellite map of an area, I already have the map/image.

Add colour coded markers or icons to the map that correspond to the events or categories

I would like to then search through the events and display the events that have occurred on the map.

Advice on if this project is feasible and also if anyone knows the best place to start  with such a project.

--
I think it's all feasible... the only place I see you having a problem is putting those location specific markers on the image unless you yourself map out all of the coordinates of the image to match the gps stuff you'll be getting back from the added events...

And, as the Munchkins said, "Start at the beginning and follow the Yellow Brick Road!"

I think the best place to start would be to create whatever you need to get the locations.  Then, once you have the locations, you work on marking them (and cataloging them), and then work on getting them out in the format you want...

--
the Static Google Maps API is easy to work with, see this example http://puravidaapps.com/snippets1.php#maps2button

but probably you want to use the Google Maps API V3 to be able to move the map, zoom in/out etc.?
In this case you will need additionally some HTML/JavaScript similar to this example http://puravidaapps.com/coordinates.php

--
This project will allow you to place up to 20 markers on a single map ( the map is displayed on a canvas so could be easily saved)
Your map would need to the same zoom as the google/mapquest available zooms/sizes, ie, not a custom size
The points are AI 'balls' so functions can be executed when they are touched
http://gallery.appinventor.mit.edu/#page%3DApp%26uid%3D302001%26label%3DAI%20Mapping%20Utility
This was built in AI1/Classic 

--

Maps Pins and Pop-Up pin information simplified for AI2 Users


Google's Fusion Table maps can be used to provide an immense amount of information about locations you provide for the map.  This Tip is a mini-tutorial about how an AI2 app can be created to provide lots of Map information and how you can make the map available to all users of your app.

There is very little AI2 coding.  You do have to create a fusion table map accessible to all users using Google's Fusion Table API   https://support.google.com/fusiontables/answer/2527132?hl=en

The Steps:
1)  Create a map using Google's Fusion Tables Maps:  https://support.google.com/fusiontables/answer/2527132   Create the table outside the Android and AI2 environment using your PC.  Yes, you can do it with Blocks, but building the table using the Fusion table page is so much easier.

2) The second piece.  You get to do this with AI2.  Place a button and a WebViewer on your Designer screen.  Add the following code Blocks:

Develop this App on your device.   You can do it on the emulator but then you have to sign in as a Google user.  Doing this on your device should avoid that for most if not all AI2 developers.

The url in the code block shown  in the WebViewer block does NOT link to a Fusion Table Map. You will link to your fusion table map later.   For a moment, use the url  as coded (   http://codeforsanfrancisco.org/Mobile-Fusion-Tables/demo-USHealthCenters.html  ).  The url points to  to a demonstration of a fusion table that shows some US Health Centers. The demonstration allows you to see what you will be able to do with a well designed fusion table map.

The demonstration works on your Android just like a well designed fusion table (described in #1). What you see is a demonstration .  The url does not link to an actual Fusion Table Map url.

3)  The third piece.  Assuming you already created a fusion table map ( create a table, as described in #1 above, including the html annotation) using your PC.View your fusion table map in your Window's browser,  note and copy the map's url from you browser's URL address box.  Copy the url into the block that now contains the demonstration url.   Yes, substitute your map url for the demo link).  What you paste is the url is a link to your fusion table map.

4) Lastly, run the app using the address of your table.

Using one of my table maps, here are the counties in the United States (instead of pins):

So are you ready to pin up?

Do you require more help with tables?   Visit https://github.com/sfbrigade/Mobile-Fusion-Tables .

Is this the entire thing?   Yes, except you probably will want to make your app pretty, add code to prevent your device's back button so it does not close the app etc.

Do you like this?   Consider donating a small amount to your favorite charity or  say something nice to someone you do not really like today?

--


Pin Buttons on Google Maps


Hi all, can anyone help me out to create colored pin button on Google maps and let it display info at bottom of screen when clicked ?

 capture.png


--

Here is how to do it with the Google Maps Statiic API   https://developers.google.com/maps/documentation/staticmaps/

Try some blocks

Put the following into   the   set Activity.Starter.DataUri to    instead of the gps lat lon.l:   
The following code, I believe is about as simple as it gets. Try it 
and see what happens.
This gets the pins. To fix the map so you can get information from a Static Map you have to do lots of things... what you are trying to do when you 'touch' a 
specific pin is not easy to accomplish without lots of Blocks.
... I do it by plotting the map to a Canvas (instead of to an image), noting the coordinates of the Google Map corners, converting the map coordinates to the screen
coordinates, using Canvas.Touch to find out the coordinates of the pin I want, then post a message based on what pin was selected. THAT is the simplified explanation.
You can also make a map that you can retrieve information about the pinned location using Google's Fusion Table maps. Perhaps this may be easier for some developers. 
You can get something like this:

 unnamed.png

How is at https://support.google.com/fusiontables/answer/1244603?hl=en ..... and then transform what is described there to blocks
and you have a very exciting interactive map.
You can work with a static map offline (without WIFI or a network connection) but the Fusion table solution requires an active WIFI or network to access the Internet. 
To use a static map offline, you initially need to grab it from Google or another source, then save it as an image for retrieval when the Android is offline. Also, 
you do NOT need a google map to work with pins. If you have a flat map image of the area you are interested in AND know the coordinates of the map edges, you can
map on this 'surface' with the pins too.
Alternatively you can create the map directly using Windows access to creation of the table, make the table using your PC ....really MUCH easier than messing around 
with Android and Fusion tables. Once the map is made, you only need a WebViewer and a url to the Fusion table map for users to get displays similar to the above.
Lots of coding, anyway you do it.
--
I have already gone through the link Google Maps Statiic API    https://developers.google.com/maps/documentation/staticmaps/

Now I am using http://maps.googleapis.com/maps/api/staticmap?zoom=13&size=600x600&scale=2&markers=color:green%7Clabel:S%7C , with this though i m able to create colored pin, however dont have idea how to get info when the pin button is clicked

i wanted to create something link this app http://www.domain.com.au/androidapp, will definitely checkout fusion tables  

--
Yes, you can put on a label with the method you mention.   I do not believe you can use that technique to post the same info when you press the pin...at least not with AI2.  

A way around that might be to create a ListPicker with the words you have on the label...perhaps     Location1, Location2, etc.      then use the ListPicker to provide the information 
about that specific pin.    I am pretty certain that would work.  You could display the result at the bottom of your screen or use a Notifier.

If you need to touch the pin and have a popup appear, the Fusion Table Maps is the only way I know of to do exactly what you want.

Perhaps someone else has done that differently and will post their solution here, so check back to the thread frequently over the next week and you might find a better answer.

The way to get info when a pin is touched might be to capture the image you get with the above method, scale the map and place it on a Canvas.  If you do that and write the algorithms to convert 
World coordinates to Screen coordinates   (and vice versa), I imagine doing that you can set the Canvas.Touch to respond when the proper coordinates are realized.   Neat solution, but I expect 
a lot of logic blocks.

Try some stuff.   If you get a neat solution, consider posting in in the Forum in the new Tips and Tricks thread area.

--
Try this demonstration in the Tips catagory of the forum.   Maps Pins and Pop-Up pin information simplified for AI2 Users   

Is this what you want to do?

--


how convert Duration Player in minutos and seconds?


Hi guys, im working with player in this platform and Id like to show the duration of a mp3 file in minutes and seconds as a normal player. but i cant. anyone could help me?

--
The Duration returns length in Seconds. So, divide by 60 to get minutes and seconds

--
Watch this video
make this block .it works for me,use timer

image.png 표시 중


Watch this video


The Duration returns length in Seconds. So, divide by 60 to get minutes and seconds

Hi guys, im working with player in this plataform and Id like to show the duration of a mp3 file in minutes and seconds as a normal player. but i cant. anyone could help me?

--  

turning to next screen using a button


i am having a problem with if i were to push a button it would switch to the next screen but it wont

--
Does the screen name on your open screen block exactly match the name of the screen you created? Also upper and lower case characters?
If not, correct it, if yes, post a screenshot of your blocks.
Cheers, Ghica.

--

The recommended method of switching screens in App Inventor

-- 
ok thanks


-- 

2 basic questions for copy/paste Blocks and so on


hi there! just getting started with app inventor, made a "hello world" app & now working on a simple color picker. i have run up against 2 basic things i can't figure out, i suspect it may be that they just can't be done but figured it was worth asking.

1. is there a way to copy and paste components in the Designer? for instance, i've made a table arrangement full of labels and sliders and i want to make a copy with a few little changes. it was kind of a pain to make the 1st one and took several tries (some bugginess in the way tables are filled?), so if i can avoid building again from scratch that would be ideal. but the Components panel only seems to give options to rename or delete, and using control click (which works to copy/paste Blocks) doesn't seem to do anything.

2. is there a way to change the same parameter of a whole bunch of labels at once, without having to set each one individually? for instance, i want all the labels within a certain vertical arrangement to change text color when a button is pressed. i can obviously do this by using "set LabelXX.TextColor" for each of the 25 labels, but it seems like there should be an easier way.  in the Blocks menu, under "Any component-->Any Label", i thought i could use "set Label.TextColor of component" and give it the entire Vertical Arrangement as the component parameter, but it won't accept that block, nor any block other than a single label. which seems to just do the same thing as using "set LabelXX.TextColor" from the individual label blocks, so i can't even figure out why it exists as a separate block if it just does the same thing? :/

--
1. Currently, there's no way to copy and paste components. We can only duplicate the blocks, either by right clicking and selecting DUPLICATE or dropping them in the backpack, on the upper right corner of the blocks editor, to use them in a different screen or project.
2. Please see the sample in this image to change the text color of 5 labels at the same time.

 Capture.JPG
--
Each component has to be dragged into the Designer individually.

Horizontal and Vertical nested arrangements work better than Table Arrangements, at setting uniform heights and widths inherited from an enclosing arrangement.

The Any component blocks work best with lists of components, built up at Screen.Initialize time.
See attached for an example.

I tried a Kakuro simulator with 120 labels and 120 buttons, but it bogged down from too many components in the Designer,
so at some point you might have to switch to drawing your "components" on a Canvas instead.

collect_buttons.png 표시 중

clear_buttons.png 표시 중

-- 
Question 1: no. You cannot copy designs. But yes, you can copy blocks via the backpack.
Question 2: The way to change your 26 labels (do you really need that many?) is, to create a global variable that will contain a list with these lables. Fill this list in Screen1.Initialize.
When you need to set the attributes, you use a for each item in list block and use the item as component in the any block.
Something like this (I made only 3 labels). Cheers, Ghica

--
thank you all for your quick and informative replies!

can anyone comment on the advantage of defining the list at screen initialize as Abraham and Ghica have done, vs defining it within the button press event handler as Italo has done?

I'm also not clear on the need for the "create empty list" command, if anyone can elucidate its usage.

in the end, i'm not sure if the list method is worthwhile in this particular case, since i am only changing a single parameter it may be easier to just set them all one by one.  but if i were trying to change multiple parameters, this would def be the way to go.  thanks again for your advice :)

-- 
If you need to use the list more than once, it is better to do it during initialize. Italo was just clarifying the concept I assume. In his implementation you would create the list every time you press the button, which is not nice if the list is very long.

Creating the empty list is not really necessary, you could also have set the variable to an empty string or 0. But is wise to create the variable with a value that inicates its later use.

As soon as you would want to do something else with your labels, or when you would want to add or remove a label, you will find that this list method is much more powerful and it is less easy to make mistakes, once you have set it up.

-- 
The way I did it is for when you are not going to use the list many times. Like Abraham and Ghica did is better if you change the properties of that list of components many times in the project. That way you save blocks, by just mentioning the global that contains the components.

-- 

 the need for the "create empty list" command, if anyone can elucidate its usage.


You need something to fill the empty socket for the define global variable block,
you know it will be a list, but you don't know what you will put in it yet.

You need the empty list value there to insure later on when you go to 
add items to it or check its contents, it will
have the proper internal structure for that and not crash your app.

-- 
last q's for Abraham: why did you use the procedures to contain the other blocks, and would it work without them? and why local variables instead of global?


-- 

why did you use the procedures to contain the other blocks,


Collecting all the components took a lot of blocks, but accomplished only one result.
It was only a small part of the initialization process, and for the sake of readability,
hiding it away in a separate procedure makes it easier to see the rest of the initialization
process at a glance, without the wallpaper of all those blocks.

I find it easier to understand what I write if I divide it up into pieces that will fit onto one computer screen,
with a single purpose to each piece.

and would it work without them?


The app might work, but I would find it harder to maintain and grow.

and why local variables instead of global?

Have you ever seen a movie or TV show where the boss is evil and tells his
employee: "I want it done, and I don't care how you do it!"?

That's an abuse of a proper management practice where a boss sets up the work
environment for his employees to produce results without interfering with
each other or with himself.  

Local variables are handy for temporary work, where you don't want to litter the name space after you're done.
Global variables are necessary for debugging and for a well managed shared object, but they come with a cost
in complexity.  You have to constantly worry about which procedures might be changing them behind your back,
unless you exercise conscious restraint and allow only a small number of procedures to access them in a small
number of places.  

That's why I used a local variable and a result procedure.  Collecting all my buttons is one thing, and assigning
the collection into whatever list I keep them in for the long term is another decision, up to the calling routine in
my initialization code.


-- 

search results for copy screen


Also, when copying screens from one project to another, be sure to also copy any assets needed by those screens from the source project to the ...
You do not need the 7zip (www.7-zip.org) archiving utility to copy screens, but it can simplify things a bit. Note: to copy screens manually using ...
I get similar messages for both of the other screens. Any insights? -- SusanOn Saturday, March 15, 2014 7:37:23 PM UTC-4, phantomfoot wrote:GOOGLE ...
Make a copy of Screen1.scm and Screen1.bky files, do a replace on any references in them from Screen1 to Screen2' (as you did), then save those ...
This project provides a library of procedures which can be used directly or can be accessed via passing values between screens to aid in nested ...
VIDEO TRANSCRIPT: (copy this text then paste @ Google Translate > translate. google.com < to translate to your language. Hello App Inventors.
However, if you are passing values between screens using open another screen or other screen closed, it is necessary to either have an android ...
See the first two links in this list: https://groups.google.com/forum/#!searchin /app-inventor-developers-library/copy$20screens.
StoreValue block will copy the shopping list to the database Drag and snap a TextBox1.Text block below TinyDB1.StoreValue.

AI2 Project Merger Tool: combine two App Inventor projects into one


Developed by Kate Feeney of Mills College, the AI Merger Tool lets multiple users develop screens for an app in different projects and later merge the screens to produce a single project. This is useful for classroom projects, and to anyone developing an app with a partner.
Related Reading:
Encouraging Collaboration through App Inventor, thesis by Kate Feeney
ABSTRACT: App Inventor is a free, open source application that permits people with any level of programming background to create software applications for the Android operating system. At the time of its open source release, it lacked important resources for supporting collaboration: documentation for source code contributors and technological support for users developing apps in a group environment. To address these issues, I added a property to an existing component and then created detailed documentation about the process for future developers. I also created a tool for merging multiple projects, which will encourage teamwork by allowing multiple users to code separately and then combine their work. These contributions will increase collaboration among users as well as developers of App Inventor.
Download the AI2 Project Merger
This is a zip file that contains the AI2MergerApp.jar file and a ReadMeFirst.txt file

Grade Level: 

  • 6-8 
  •  
  • 9-12 
  •  
  • Undergraduate 
  •  
  • Master's and Above



Difficulty Level: 

  • Basic 
  •  
  • Intermediate 
  •  
  • Advanced



Subject: 

  • Computer Science

Resource Type: 

  • Paper 
  •  
  • Tool



Project Merger Tool: combine two App Inventor projects into one


App Inventor Classic • App Inventor Classic • App Inventor Classic • App Inventor Classic
This information pertains to App Inventor Classic. Information about the merger tool for App Inventor 2 can be found here.
Developed by Kate Feeney of Mills College, the AI Merger Tool, allows multiple users to develop screens for the app in different projects on different or the same accounts and later merge the two App Inventor projects together. This tool will be very useful for classroom projects, and to anyone developing an app with a partner.
Related Reading:
Encouraging Collaboration: AIMerger Tool, thesis by Kate Feeney
ABSTRACT: App Inventor is a free, open source application that permits people with any level of programming background to create software applications for the Android operating system. At the time of its open source release, it lacked important resources for supporting collaboration: documentation for source code contributors and technological support for users developing apps in a group environment. To address these issues, I added a property to an existing component and then created detailed documentation about the process for future developers. I also created a tool for merging multiple projects, which will encourage teamwork by allowing multiple users to code separately and then combine their work. These contributions will increase collaboration among users as well as developers of App Inventor.
Download the AIMergerDocumentation for more detailed instructions on how to use the AIMerger tool.

Files:
 app_inv_companion_qr_store.png


Grade Level: 

  • 6-8 
  • 9-12 
  • Undergraduate 
  • Master's and Above



Difficulty Level: 

  • Basic 
  • Intermediate 
  • Advanced



Subject: 

  • Computer Science

Resource Type: 

  • Paper 
  • Tool


Android Tablet Hardware Requirements/Recommendations


Where can I find a list of the hardware requirements and recommendations for Android tablets?

-- 
You cannot develop apps ON tablets.
Developing for tablets is another issue.
Please specify your question.
-- 
Is  there a list of recommended hardware specs for the tablets that will run the apps that are developed using another system? Would any Android tablet with Gingerbread or higher work, or would we need a more modern tablet? How much storage is needed?
-- 
There is no list Michael.  This is what MIT says for requirements/capability


Phone or Tablet (or use the on-screen emulator)

  • Android Operating System 2.3 ("Gingerbread") or higher

I would want to ensure the Tablets have a software driver available from the manufacturer to allow USB debugging if you use Windows PCs.  This is the software that installs on the computer.  Without the software, the Tablets cannot be used with USB.  Some inexpensive Tablets are not capable of using the USB AI2 option because the hardware company does not provide the USB software described here:http://appinventor.mit.edu/explore/ai2/setup-device-usb.html   and specifically:

Setting up a USB connection can be awkward, especially on Windows machines, which need special driver software to connect to Android devices. (This is not the case with Mac or Linux, which do not need special drivers.) Unfortunately, different devices may require different drivers, and, outside of a few standard models, Microsoft and Google have left it to the device manufacturers to create and supply the drivers. As a consequence, that you may have to search on the Web to find the appropriate driver for your phone. App Inventor provides a test program that checks if your USB-connected device can communicate with the computer. You should run this test and resolve any connection issues before trying to use App Inventor with USB on that device.

This link discusses drivers:   install Windows drivers 

 The driver issue is mentioned because we know of some institutions that bought dozens inexpensive Tablets that could not work with USB, necessitating WIFI in the classroom.  Some manufacturers insist their software does not require drivers for USB.  That is not true; if you have a Win based PC system, you need the drivers  (I do not know whether the devices that do not have drivers available will work on Mac or Linux...however, guaranteed they will not work on Windows systems for the USB connection.  There are inexpensive devices that do have driver software.

Devices currently using Android 2.3 and higher will work.  If you want to experiment with geolocation, you need a Tablet with a GPS receiver--only some Tablets come with a GPS and are usually the higher end Tablets.

Is this what you wanted to know?   If you are going to buy many devices, I recommend getting one first (borrow one, buy one) and test it and avoid disappointment.

--