2014년 11월 27일 목요일

Your Testimonials


Hi All App Inventors!

As we prepare for the release of App Inventor 2, we're seeking testimonials that we can post to our website and share with press outlets.

So, we'd love to hear your stories about how App Inventor has worked for you and/or your students.

C'mon - tell us how great this thing is... ;-)

Seriously, though, these will be really useful to our outreach around App Inventor, and we very much appreciate any time you take to think about and send these to us.

With your story or comments, please also tell us how you'd like the quotes attributed, with your name, name and affiliation, or anonymously...

And you have your choice of replying here (obviously not anonymous), or to my email (below) directly.

--
I just LOVE this tool, it is AMAZING!! Now I don't have to code everything!

--
How about this one?

Here are the results of an informal comparison between Java and App Inventor for making a simple color picker as I posted it in one of my App Inventor support forums a while back:


First, I am a fan of both structured programming languages and object oriented languages. But when I compare solving a problem such as including a color picker in an app, I have to say AI has Java beat - at least if you consider the amount of programming effort required. For example: The Android SDK contains a color picker which I have seen used in apps. It is fairly simple in function, and does not provide for Alpha transparancy or shades of gray. It looks like this:
The Java code for this is as follows (I don't expect you to read or understand it, just notice it's size and complexity, while scrolling to the end...):
/*
 * Copyright (C) 2007 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.android.apis.graphics;

import android.os.Bundle;
import android.app.Dialog;
import android.content.Context;
import android.graphics.*;
import android.view.MotionEvent;
import android.view.View;

public class ColorPickerDialog extends Dialog {

    public interface OnColorChangedListener {
        void colorChanged(int color);
    }

    private OnColorChangedListener mListener;
    private int mInitialColor;

    private static class ColorPickerView extends View {
        private Paint mPaint;
        private Paint mCenterPaint;
        private final int[] mColors;
        private OnColorChangedListener mListener;

        ColorPickerView(Context c, OnColorChangedListener l, int color) {
            super(c);
            mListener = l;
            mColors = new int[] {
                0xFFFF0000, 0xFFFF00FF, 0xFF0000FF, 0xFF00FFFF, 0xFF00FF00,
                0xFFFFFF00, 0xFFFF0000
            };
            Shader s = new SweepGradient(0, 0, mColors, null);

            mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
            mPaint.setShader(s);
            mPaint.setStyle(Paint.Style.STROKE);
            mPaint.setStrokeWidth(32);

            mCenterPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
            mCenterPaint.setColor(color);
            mCenterPaint.setStrokeWidth(5);
        }

        private boolean mTrackingCenter;
        private boolean mHighlightCenter;

        @Override
        protected void onDraw(Canvas canvas) {
            float r = CENTER_X - mPaint.getStrokeWidth()*0.5f;

            canvas.translate(CENTER_X, CENTER_X);

            canvas.drawOval(new RectF(-r, -r, r, r), mPaint);
            canvas.drawCircle(0, 0, CENTER_RADIUS, mCenterPaint);

            if (mTrackingCenter) {
                int c = mCenterPaint.getColor();
                mCenterPaint.setStyle(Paint.Style.STROKE);

                if (mHighlightCenter) {
                    mCenterPaint.setAlpha(0xFF);
                } else {
                    mCenterPaint.setAlpha(0x80);
                }
                canvas.drawCircle(0, 0,
                                  CENTER_RADIUS + mCenterPaint.getStrokeWidth(),
                                  mCenterPaint);

                mCenterPaint.setStyle(Paint.Style.FILL);
                mCenterPaint.setColor(c);
            }
        }

        @Override
        protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
            setMeasuredDimension(CENTER_X*2, CENTER_Y*2);
        }

        private static final int CENTER_X = 100;
        private static final int CENTER_Y = 100;
        private static final int CENTER_RADIUS = 32;

        private int floatToByte(float x) {
            int n = java.lang.Math.round(x);
            return n;
        }
        private int pinToByte(int n) {
            if (n < 0) {
                n = 0;
            } else if (n > 255) {
                n = 255;
            }
            return n;
        }

        private int ave(int s, int d, float p) {
            return s + java.lang.Math.round(p * (d - s));
        }

        private int interpColor(int colors[], float unit) {
            if (unit <= 0) {
                return colors[0];
            }
            if (unit >= 1) {
                return colors[colors.length - 1];
            }

            float p = unit * (colors.length - 1);
            int i = (int)p;
            p -= i;

            // now p is just the fractional part [0...1) and i is the index
            int c0 = colors[i];
            int c1 = colors[i+1];
            int a = ave(Color.alpha(c0), Color.alpha(c1), p);
            int r = ave(Color.red(c0), Color.red(c1), p);
            int g = ave(Color.green(c0), Color.green(c1), p);
            int b = ave(Color.blue(c0), Color.blue(c1), p);

            return Color.argb(a, r, g, b);
        }

        private int rotateColor(int color, float rad) {
            float deg = rad * 180 / 3.1415927f;
            int r = Color.red(color);
            int g = Color.green(color);
            int b = Color.blue(color);

            ColorMatrix cm = new ColorMatrix();
            ColorMatrix tmp = new ColorMatrix();

            cm.setRGB2YUV();
            tmp.setRotate(0, deg);
            cm.postConcat(tmp);
            tmp.setYUV2RGB();
            cm.postConcat(tmp);

            final float[] a = cm.getArray();

            int ir = floatToByte(a[0] * r +  a[1] * g +  a[2] * b);
            int ig = floatToByte(a[5] * r +  a[6] * g +  a[7] * b);
            int ib = floatToByte(a[10] * r + a[11] * g + a[12] * b);

            return Color.argb(Color.alpha(color), pinToByte(ir),
                              pinToByte(ig), pinToByte(ib));
        }

        private static final float PI = 3.1415926f;

        @Override
        public boolean onTouchEvent(MotionEvent event) {
            float x = event.getX() - CENTER_X;
            float y = event.getY() - CENTER_Y;
            boolean inCenter = java.lang.Math.sqrt(x*x + y*y) <= CENTER_RADIUS;

            switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN:
                    mTrackingCenter = inCenter;
                    if (inCenter) {
                        mHighlightCenter = true;
                        invalidate();
                        break;
                    }
                case MotionEvent.ACTION_MOVE:
                    if (mTrackingCenter) {
                        if (mHighlightCenter != inCenter) {
                            mHighlightCenter = inCenter;
                            invalidate();
                        }
                    } else {
                        float angle = (float)java.lang.Math.atan2(y, x);
                        // need to turn angle [-PI ... PI] into unit [0....1]
                        float unit = angle/(2*PI);
                        if (unit < 0) {
                            unit += 1;
                        }
                        mCenterPaint.setColor(interpColor(mColors, unit));
                        invalidate();
                    }
                    break;
                case MotionEvent.ACTION_UP:
                    if (mTrackingCenter) {
                        if (inCenter) {
                            mListener.colorChanged(mCenterPaint.getColor());
                        }
                        mTrackingCenter = false;    // so we draw w/o halo
                        invalidate();
                    }
                    break;
            }
            return true;
        }
    }

    public ColorPickerDialog(Context context,
                             OnColorChangedListener listener,
                             int initialColor) {
        super(context);

        mListener = listener;
        mInitialColor = initialColor;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        OnColorChangedListener l = new OnColorChangedListener() {
            public void colorChanged(int color) {
                mListener.colorChanged(color);
                dismiss();
            }
        };

        setContentView(new ColorPickerView(getContext(), l, mInitialColor));
        setTitle("Pick a Color");
    }
}

*********************************************
***************** S T O P *****************
*********************************************

Now here are the core blocks to accomplish the same thing with AI:
But, wait - you might be saying, there is a lot of code under the covers to get these blocks to work - that is true but I don't have to deal with it. That is the point.
Productivity, power, ease of use, not to mention the fun of clickng blocks together - those are the things I am looking for. Of course you have to lay out the color wheel
(which I have admittedly just copied a picture of) in the Screen Designer and make menus to access the color picker dialog box, but that is fairly trivial. Here is the dialog box
in the Screen Designer:
Nothing really complicated there.
Here are some pictures of the output:
What do you think?
--
This is a beautiful example!  Thanks for posting it. We couldn't agree with you more.
--
Agreed - this is great - thanks so much, Scott!

--
App Inventor just made hardware control very easy and accessible. Thanks to the developers for the fantastic work!

--
I am trying to pick a color, split it into it's RGB components, and send them out over bluetooth. I have successfully made it as far as choosing the color and changing a button to said color...however I cannot figure out the "split color" block. It will not let me connect a list block to it, and I've run out of ideas. I can't find much info about the split color, any and all help would be greatly appreciated! Here is what I currently have.
Thanks in advance
Design:

Blocks:

 --
instead of hijacking the testimonials thread, it would have been nice to open a new thread ... 

-- 
Hello, I was just shown App Inventor1 earlier this month and quickly adapted to the easy process of programming with blocks.  I must say, this program is truly amazing for anyone to learn.   I remember way back in highschool when they use to teach turing, Qbasic, or Pascal.  Its not always easy for kids to learn and understand logic for the first time, but App Inventor literally puts programming into a visual concept.   Reguardless of the hidden programming behind each blocks, the blocks are a great teaching device for explaining how things really do actually flow in a program.  Anyone can learn this quick....I know i sure did!

Within 3 weeks i have already leaped to App Inventor2.  It took some adjusting, but it was easily adaptable.  This program at the very least will be a huge hit with educators and help rapidly speed up the process of understanding flow and logic.  
With all the available tutorials and the huge community of  supporters, people can learn very quick.   
I have already made 6 involving apps.    4 huge multiple choice quiz's each with 100 questions,  A childrens game pad with 10 different selectable educational games inside, and now a  physical game all with timers, scores, highscores, points,objectives and elimination results. 

-- 
I really love the way AI can assist people in realising an idea into an proper working app. I think a lot of good ideas get stranded in good intentions because people don't know how to turn those good ideas into a good working app.

Although I'm not a teacher, I do work in a school in the Netherlands (Friesland College - Leeuwarden), I think I would be able to get people get started into programming through App Inventor without too much trouble. That is, if they have some insight in programming/scripting and analytical thinking. I sincerely believe that AI is very suited to explain people what object-oriented / event-driven programming is. It is remarkable how fast you can get people started building their first real android app through AI.

I do have some programming skills out of hobbyism: I started off in the late 80's with MBasic/Turbo Basic, Clipper and later Visual Basic. In the last 10 years I have mainly used PHP/MySql for building web-applications.
But never have I encountered a development environment like AI, which makes OO-programming so understandable. The way the blocks works, but also the naming of the blocks/events are very explainable.
Yes, I really love App Inventor, and I really appreciate all the work and effort that you are investing in developing it into the great tool that it already has become.
Thank you, and keep up the good work!

Greetings from the Netherlands,

--
I've just started using the AI and getting on with the tutorials. I really like it. Is is good to see a visual representation of a program.
I've already been able to change the blocks to make the Mole Mash app work differently to reset the timer on hitting the mole. It is so easy with AI. If something doesn't work, just detach the block, and snap another one in.

Thank you for creating this.
All the best,

--
App inventor does all of the heavy lifting.  You can create anything you can imagine with app inventor as long as you can turn your imagination into logic.  Detailed thinking is the key.  Thank you to everyone who provides support and works behind the scenes.  You are all amazing and brilliant!

--
Here is a bit from a write up I recently did for the University of Utah:

"In 2012 the department launched a course on the development of mobile health apps using AppInventor, a free tool developed by Google and currently hosted by M.I.T.  Students with no programming experience each learn to create at least 12 mobile health apps during the semester.  Students tackled problems like inactivity, diet management, emergency preparedness, mindfulness and others, depending on their personal interests.  One student in particular, created an app to help a family member manage their Irritable Bowel Syndrome.   Starting in 2014, the AppInventor class will be officially endorsed as an undergraduate (QB) Math credit, and in May, Professor Rich Interdonato will be conducting a mini-course on app building with AppInventor at the American Telemedicine Association annual conference."

If you want more information, consider contacting Jill Lamping.  She might have something of interest for you too.  :)

--
I believe that the story about my APP will inspire the young students who always lament studies are hard and difficult such as my son.
This is the companion APP I made  for My website.
It took me one week to make this APP from scratch. Meaning learning how to make an APP , doing it and posting it in APP store.
I did it to demonstrate by example to my 21 year old son who is in the University here,  who wants to change his course halfway in to his degree saying subjects are too hard to learn.  Thus I wanted to demonstrate to him that it is not hard to learn an any new subject. It does not take long either, even a 58 year old man like myself can do it . What you need is dedication, interest and set your mind on the task what ever you wanted to do. Then any thing is possible. 
I live in Australia for the past 22 years and I made the first Sri Lankan Astrology web site about 14 years back which is still in the web. http://jyotisha.00it.com. Every thing in that website is done by myself. Actually I thought of making it because at that time there were no Eastern Astrological sites in the web as at that time Internet was just beginning. And India was not that computer literate.There were a few western Astrological sites that was all. 

So I wanted to show the world that there are other systems of astrology in eastern countries too.. This APP I made as a companion APP for my web site. It is not aimed at Sri Lankan or Indian Audience. It's purpose is to give an introduction of Eastern Astrology to people who have no idea about it . 
Wishing you all the best

--
Hi,  APP INVENTOR is a fantastic tool and now I can realize my own apps using cam, web, music ... special effects!
One question: Why I can't program with AI using google chrome on my android tablet?

--
Francesco... Thanks for the nice words about AI!

You can run your app on a device like a tablet or a phone, but you cannot program on either because dragging and dropping is not enabled in the User Interface for tablets and phones at this time.

--
Hi Francesco, I have an iPad 2 that I use Chrome browser on, i have found that I can log into app inv 2 on the tablet and control the behaviors of existing components on the tablet. If I find I need to add components like a button or anything I make note of it and add it later when I get to my laptop. I find it to work smoothly and by breaking it up I can do quite a lot on my tablet. I hope in the future there may be an update that will incorporate drag and drop. I hope this helps you and anyone hoping to make use of a tablet when on the go and use app inventor.

--
thank you!

--
I just found about App Inventor today.  I've been fusing with a number of solutions for creatign apps on android that have a host of cumbersome issues or have equipment requirements (i.e. app loader not running on my desktop or the APK created will only work on very specific configurations). I've been programming for fun and to provide plugins and tools for my professional work for about 30 years now and it is a joy to find such an easy to use tool to develop apps for my mobile so quickly and easily.
Just three hours from discovery to first multi-screen multi-control app. 

--
Just published my first game in Google play made with App Inventor 2.
Had great time making it...Thank you for this tool.
app name is "numgu_lite"

--
yes this is a marvelous tools when it work.for now i can't rebuild any of my apps.
Server rebuild it without error,adb reinstall it perfectly but manager never add nor start the app.what happens!!!

--
Im new usng AI2 and im having problems, when I typed the projects name and clicked OK Design Window did not open and I can't figure out how to see it. Some help needed

--
Please do the tutorials first... it'll make it a LOT easier for you in the future...

The tutorials are located here: http://appinventor.mit.edu/explore/ai2/tutorials

--
I'd be very pleased if I can include  procedures variables ( especialy those customized by myself).. from one screen to another so it'd be really object oreinted - and maybe also another existing blocks from scren 2,3..x like there's option for 'any other component' - you click on it and options list reveals

--
Robert... Please don't hijack threads in the forum.  This thread is for Testimonials... "I love it because..."

In the future, please post a regular discussion by starting a new thread.

You can add things you want to the App Inventor Issues List.

You can move variables back and forth between screens with the TinyDB...

--
I use MIT app inventor. It is a program built to make programming more simple, and less meticulous. It is like programming in yet an even higher level than Java, and easy to learn. I don't like traditional programming because of how slow it is, and how you get errors for everything and takes you forever to debug. Instead of doing the pain staking line by line coding, you just piece intuitive blocks together, which are self-explanatory. I am currently working on a quality game with it.

--
I like to think I'm smart on the computer. I mean, I've done a lot of geeky things in my quest for knowledge but, trying to understand app building and design has been pretty hard for me. Finally!! I can build apps in a way that I can understand. This tool is AWESOME and I'm having a blast! 
I haven't had this much fun in a long time. Thank you for being here and letting me learn.

--
You and your team have put together an absolutely amazing system.
I cannot wait to see the latest version.
I have started to post my "WishList" thoughts - please check it out.
Best to you and everyone on the team.

--
Test:  Does this unlock the topic?  

--

THE WIDTH OF THE SCREEN IN APP INVENTOR


I'm having trouble width the screen that it is not large enough to complete the draft if allowed to Make a scrollable for the width 
I hope to answer me

--
You can not scroll the width in App Inventor on Screen1 or any of the other screens.  You can only scroll up and down (assuming you set the Screen1 Property of Scrollable by checking the box under Properties) You can scroll the width if what you are viewing can be accessed by a WebViewer or using the ActivityStarter.

A possible solution is to change, in the Designer Properties bin for  ScreenOrientation from Unspecified  to  Landscape or Sensor.

Did that answer your question?

--
I did all  thing you said but it didn't usefull

knowing i finished my project and i answer this problem but after a surge tired

i want to make alot of project 
 so i want from the desiner to redesine the Characteristics and put the scrollable

--
Sorry this is not working for you.  App Inventor is NOT a professional compiler.  It is open source and depends on contributions of code.  At the moment, it is impossible for an AI2 app to scroll the width dimension of an AI2 Screen without using a WebViewer/ActivityStarter.  You can not do this with AI2.

If you need to do this, consider the professional Android free development compilers Eclipse and Android Studio.

What you can do, to ameliorate the problem is re-use controls by hiding and restoring them as described here: 

⦁ Building apps with many screens

Doing the things shown there allows you to put a lot of controls on a single screen and hide or show them only when needed.

If you check this box, the screen becomes scroll-able from top to bottom.  There is no control to make it scroll-able from left to right.

Here is what this forum's users know about screen layout (where you place buttons, how you can arrange them etc) https://groups.google.com/forum/#!searchin/mitappinventortest/screen$20layout

There may be some techniques there...you will have to look at all the posts to find what you need.

If you need help in learning to program: MITs tutorials    http://appinventor.mit.edu/explore/ai2/tutorials.html help you learn.  The
AI2 free online eBook   http://appinventor.mit.edu/explore/ai2/tutorials.html   ... the links are at the bottom of the Web page.  Teaches you how to do many things with the AI2 blocks.

--
Thanks Steve 
Although all your replies you don't understand what I want
My project is periodic table so Ineed a big width and I need a lot of buttons 

--
App inventor does deal with scrollable width.   We can think about adding that feature, but it's not srtraightforward to implement and we're unlikely to get to it soon.

Try designing your periodic table as several pieces, each of which fits on a screen and putting these on different screens, and then adding controls that let people move to between screens.

--
OK..now that you elaborated, you MIGHT be able to use a Canvas like:  About the amount of BUTTONs    

or use a sprite for each element block within the Periodic Table and arrange them on the Canvas.   (Each element block would need to be an image of what you want written within the block.    Messy, but doable.

or  an html table with a WebViewer http://puravidaapps.com/table.php
table3.aia

Pictures transend language; a few screen captures would have made this discussion simple. 

--
Ok , thanks all

--

Help with spinner please


Can somebody please supply a link for me to learn about spinner please, I need to know how to specify what item was selected, and how to display via a list the item selected, as well as linking the item selected to a global variable which has a value, thanks Terence



--
ALL there is to know about the spinner is here Terrance:  Controls:  Components - App Inventor for Android  

You can find stuff like this by selecting Guide from the MENU options on the AI2 browser.   This particular reference is near the bottom of the Web page.

Other things you need to know:

Lists

List of Lists

--
Thanks, not sure how I managed to miss that !

--
refer to: Search for Help with spinner please

--

Is App_Inventor_Setup_Installer_v_2_2 safe right now?


I check files to see if they are safe with Virustotal. When I ran this installer through it, it claimed that it detected a bad antivirus used a few days ago, I reanalyzed today and it detected two trojan antiviruses, namely: DrWeb, and NANO-Antivirus. Should I be concerned?


--
Should you be concerned?   Yes.

Specifically, what files were reported as being contaminated?   Where these the AI2 installation files or something you coded yourself?  Where did you download them from?


I just downloaded AppInventor_Setup_Installer_v_2_2.exe   and my McAfee checker gives the file a clean bill of health.  That in itself is no guarentee the file you have is OK.  Did you use this link      
  1. Download the installer.

--
Thanks for letting us know.    There's no virus or Trojan.    We'll look into this, but those scanning companies are notorious about issuing false positives and leaving others to clean up their mess.

PS: We'll be updating the Windows setup software before too long.  Look for the announcement in the forum.

--
I just scanned it and it is now up to 4 positives:
DrWebTrojan.DownLoad3.3376320150119
JiangminTrojan/Rozena.dyn20150118
K7GWDoS-Trojan ( 20036d9f1 )20150117
NANO-AntivirusTrojan.Win32.Agent.djebgp20150119

This is not a good sign.  Now I know sometimes developer packages can set these things off.  Somebody I would say definitely needs to look into this in depth.  

--
What app did you just scan?  One you made with AI or something else?

What program did you scan this AI2 app with ?  AVAST, AVG, Eset or something else.  We are aware some versions of that software do provide false positives.

Did you scan the apk on the PC or the device?    

Is this an app with Web  PUT and GET calls?   Some scanners do not like those calls.

Have you a scanner on your app like the free McAfee Mobil scanner?   What does that scanning app say about your app versus the scanning app you are using?

--
@SteveJG, he is talking about virustotal.com 
you can see the result of the latest scan of the file AppInventor_Setup_Installer_v_2_2.exe here https://www.virustotal.com/en/file/4f5574b295a22362d8e181c3cf83979078ae10a0665ea22b260478ec48694664/analysis/

--
Yes, Virus total.  This is on the INSTALLER as SteveJG says.

Last night I ran MS maliciousSoftwareRemover and Sophos independent and came up with no infections, but that is no guarantee.  If you are not familiar Virus Total runs 56 scans using different scanners.  

--
as Hal said 
"those scanning companies are notorious about issuing false positives and leaving others to clean up their mess."

-- 
I would really like to help get to the bottom of this issue, it is fraught with many variables to consider in order to find, diagnosis and analyze and come up with the right answer and solution. Your help is greatly appreciated. I see you just made a reply `to Steve's, and will look at it closer, but as much detail as you can give us would be most beneficial. I will start investigating this issue very carefully.

Any more information would be helpful, and thanks again.
--
@Andrew: from the FAQ https://www.virustotal.com/en/faq/

VirusTotal is detecting a legitimate software I have developed, please remove the detections

VirusTotal acts simply as an information aggregator, presenting antivirus results, file characterization tool outputs, URL scanning engine results, etc. VirusTotal is not responsible for false positives generated by any of the resources it uses, false positive issues should be addressed directly with the company or individual behind the product under consideration.
We can, however, help you in combatting false positives. VirusTotal has built an early warning system regarding false positives whereby developers can upload their software to a private store, such software gets scanned on a daily basis with the latest antivirus signatures. Whenever there is a change in the detections of any of your files, you are immediately notified in order to mitigate the false positive as soon as possible.
you can see the result of the latest scan of the file AppInventor_Setup_Installer_v_2_2.exe here https://www.virustotal.com/en/file/4f5574b295a22362d8e181c3cf83979078ae10a0665ea22b260478ec48694664/analysis/
--
This issue really is a pain.  I have seen this before with other developer packages (I do a lot of astronomy and at lot of our software is public domain.... but you have to be careful.  I suspect this is OK, but it would be nice to see the source code and compile it ourselves....  anyway, hard to spend enough time on this. 

--
App Inventor is an open source project...  However, I don't believe the setup tools are part of the source project.  The source code is located here:
http://appinventor.mit.edu/appinventor-sources/

A new set of setup tools are not far away, but no ETA yet.

--
no like

--

AI-BlockyTalky Extension


We're working with Ben Shapiro to extend AppInventor to support the BlockyTalky protocol, to add support for communication with hardware components, and we had a few design and integration questions.

What kind of testing is supported in AI? We found a couple of examples of unit testing on components but we'd like to have good test coverage and were wondering what the team typically uses.

We'd also like to make this into some kind of a plug-in or extension to AI, and would love some feedback on how to architect our code--we weren't able to find an extension mechanism, but want to keep the project as modular as we can.

Feel free to keep an eye on our progress, and thanks in advance for the feedback!

--
BlocklyTalky is awesome! any kind of integration would be fantastic.

Regarding testing, unit tests are the only thing we tend to write
right now; we do quite a bit of manual testing on different devices
and emulators before releasing, but automating UI stuff is generally
not easy. You can test your non UI code at a unit and integration
level if you have code that 'talks' to other things (network, disk,
and so forth), as long as you abstract your logic and decouple it from
the UI. You could use mocks and stubs, and if you need an additional
library such as mockito or similar, it should be easy to add (just add
it to the appinventor/lib/new_library folder, and then to the testing
classpaths in the ant files of the projects that need the library).

With regards to extensions, we've been talking for ages about a CDK
(Component Development Kit) to be able to treat components as plugins,
and there's a prototype for non-visible components (written a few
summers ago), but nothing that can be released any time soon. So for
now, I would work with components as explained in the docs.

It would be great to hear more from you to see what kind of stuff you
are thinking about. Would you be interested in joining us for an AI
open source hangout? You could show us the kind of things you are
doing, and we could discuss how integration could be achieved. We
generally have our hangouts once a month on a Saturday around noon or
1pm EST. There's nothing planned for this month, so we could start a
conversation there. What do you think?

--
It would be terrific to have one of the open source hangouts devoted to the blocky-talky work,

--
We'll probably do some mockup testing for the web socket communications, we'll keep working on that. 

Doing a hangout would be awesome! We can show you what we've done so far and where we there thinking of going next semester--we'd love to get your feedback. The end of our semester is coming pretty quickly, but we could potentially do Dec 6 or 13. Do you all have a preference?

--
I will be traveling on Dec 6, so someone else will have to organise the hangout if that's the date chosen. I'll be happy to watch it afterwards and provide feedback in any case!

--
I'm afraid I cannot do either the 6th or the13th.     I could do a hangout after 3PM (Boston time) of Monday 12/8, Tuesday 12/9 or Thursday 12/11.
Ben:  You said you could pick a slot.   Could you do that and let everyone know and we'll try this for whoever can make it?
Also, is there something we can read or look at in advance?

--
How does Wednesday, December 10 at 1:15 sound? We can come down to MIT and broadcast from there, or do a hangout from here. 

Hal, we can put together a write-up if you'd like, otherwise our fork of the repo is on Github: appinventor-sources along with some miscellaneous related code.

--
1:15 on Dec. 10 at 1:15 would be great for a visit and presentation on the App Inventor work you've been doing with Blocky-Talky.  One warning: we have a hard stop at 2:00, so you might want to try to get there earlier.   Some of the people can also stay around after 2 and we can chat about plans and implementation issues.

--
It's going to be difficult for people in other timezones to make that
time, but if you guys start a hangout on air with the open source
account, we can watch it afterwards.

--
We'll  try to set this up, but the quality might not turn out well, given the room.

--
Singleton BlockyTalky Component

Cannot Find Symbol for blokytalky

--

Share Pictures with Text via Whatsapp


I am trying to put together an app that allows to share a picture combined with a text via - preferably - Whatsapp. I have tried the "Sharing" handle integrated in App Inventor, but it only works with certain messaging apps, like email, and failed me with Whatsapp and facebook, where I only was able to share the picture without the text.

Now I tried to recode and used the Activity Starter handle to share the picture and the text (see below). I have been able to share a text through this, but I am not sure how to set it up for sharing pictures. I suppose I have to change

DataType to image/png
ExtraKey to android.intent.extra.STREAM
and introduce DataUri 

But I am missing the final piece to put it all together - hopefully someone can help!



--
Refer to: http://ai2inventor.blogspot.kr/2017/03/android-tutorial-how-to-send-whatsapp.html

Pictures/Photos Project, is it possibile...?


my idea is basically something that permit me to take load photos from the phone, than assign some tags/category to the selected photos... And at the end permit me to search and querying photos by category/tags and show me the result.

Is it possible to do with appinventor2?

Could you explain me the summary logic of the component i should use in order to build this app?

-- 

Be aware, the AI2 Camera control is buggy, difficult to use, stores images under 'random' names that have to be saved into a List and accessed by a TinyDB.    

AI2 has no capability of examining the contents of a folder (the File control, which one would expect could find a file without knowing its name, presently can not).  Therefore, it is impossible to grab an image file by name, unless you know the name and file path.

In order to build your described app, try Eclipse, Android Studio or commercial tools like Basic4Android (not very expensive).

AI2 is NOT a professional compiler.    It is great to have fun with, but its capabilities are limited.

--
yes you can


as a start, see this snippet https://puravidaapps.com/snippets.php#2share     
share.aia

just store the path to the taken image or the picked image in a list and your tags in a second list (if there is more than one tag for an image, this will be a list of lists), then store both lists in TinyDB


the image picker can only pick 10 images, therefore you might want to use this alternative solution with the activity starter How to pick an image using the activity starter
for searching your tags comfortably, let me suggest to store the tags for each image in a fusiontable
see the tutorial Pizza Party with Fusion Tables for App Inventor 2 for how to work with fusiontables

try something and have fun! there are more things possible than some people think...

first 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

--
As Taifun's note indicates, what you can do related to your projected app is VERY limited.  What it can not do is take random images from your phone; it is only going to work as he describes with images you take with the broken Camera control.

--
As Taifun's note indicates, what you can do related to your projected app is VERY limited.
probably there is a misunderstanding?
what I was saying is, that the project is doable, I can't see any limitations for this project

What it can not do is take random images from your phone

... the broken Camera control
there are issues with the camera component and some devices, see here camera not working w/ASUS TF101 
and https://code.google.com/p/app-inventor-for-android/issues/detail?id=2035
and for other devices the camera component works fine...
or are there also other issues with the camera component I'm not aware of?

--
Help with project fix - Front camera  Camera not able to use front camera on some devices.

Camera is not select-able using the component on at least some devices with both forward and rear cameras - controls do not work on my devices..reported months ago.

Known camera (or other component) issues are NOT documented in the MIT component documentation.  MIT will get around to this one day...documentation is sadly out of date.   Here is a MIT staff comment " Not sure if a workaround should go into documentation. I think until it gets fixed, it would be the PowerUsers to recommend the workaround. What do you think? "    

A useful Camera object would have:

1) Ability to list the files in any directory AI2 captures an image from Camera, Canvas, File (especially) and Web ..the controls that 'capture' images.
2) Ability to select any of the items (images) in the list in #1 from within AI2.
3) Ability to DELETE any of the items in the list in #1 from within AI2
4) images should go in the DCIM folder or have it as an option
5) take and manipulate image within AI2, not using kludges and external paid for apps.

AI2's component has NONE of these features without elaborate work around...yeah, some of this is possible.     Perhaps you will provide a tutorial?

The point is, what is the point of the AI2 camera control as it NOW stands?    Camera is only slightly better than the AI2 screen layout controls/placement routines.

The point here is AI2 is NOT a professional tool.  AI2 REQUIRES kludges (gimmicks) to do lots of stuff other compilers do routinely.  Have fun with AI2, it is a powerful tool for someone who has no clue how to code in Java.  Be aware, AI2 is supporting a small cottage industry of people who provide 'fixes' for a fee.   Nothing wrong with users charging for services for AI2 toys that do not exist or are 'broken.'

For the adventurous, here is some code to reproduce Taifun's  camera picture taking app... It still might work..

public void TakePicture() {

    Date date = new Date();

    String state = Environment.getExternalStorageState();

    if (Environment.MEDIA_MOUNTED.equals(state)) {

     Log.i("CameraComponent", "External storage is available and writable");

      imageFile = Uri.fromFile(new File(Environment.getExternalStorageDirectory(),

       "/Pictures/app_inventor_" + date.getTime()

        + ".jpg"));


      ContentValues values = new ContentValues();

      values.put(MediaStore.Images.Media.DATA, imageFile.getPath());

      values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg");

      values.put(MediaStore.Images.Media.TITLE, imageFile.getLastPathSegment());


      if (requestCode == 0) {

        requestCode = form.registerForActivityResult(this);

      }


      Uri imageUri = container.$context().getContentResolver().insert(

        MediaStore.Images.Media.INTERNAL_CONTENT_URI, values);

      Intent intent = new Intent(CAMERA_INTENT);

      intent.putExtra(CAMERA_OUTPUT, imageUri);

     // NOTE: This uses an undocumented, testing feature (CAMERA_FACING).

      // It may not work in the future. --sorry I lost the attribution.


--
ok, I see, the front camera feature does not work, also not on my Nexus 5... 
A useful Camera object would have:
actually 1-3 are File component requirements...
1) Ability to list the files in any directory AI2 captures an image from Camera, Canvas, File (especially) and Web ..the controls that 'capture' images.
unfortunately it is not possible to get a list of files...
yes, this would be a great enhancement of the File component
2) Ability to select any of the items (images) in the list in #1 from within AI2.
see this solution 
3) Ability to DELETE any of the items in the list in #1 from within AI2
you can do this with the File component and the File.Delete method

Delete(text fileName)
Deletes a file from storage. Prefix the filename with / to delete a specific file in the SD card, for instance /myFile.txt. will delete the file /sdcard/myFile.txt. If the file does not begin with a /, then the file located in the programs private storage will be deleted. Starting the file with // is an error because assets files cannot be deleted.

4) images should go in the DCIM folder or have it as an option
agreed
5) take and manipulate image within AI2, not using kludges and external paid for apps.
yes, image manipulation would be nice to have
further requirements from my point of view: take an image programmatically without user intervention

--
Thanks both for your point of view... My main idea was "just" an application that takes photos from the gallery and give me the capability to assign one or more tags to the photos and then give me the capability to do some research... For example... I'm looking for a new jacket, i go in some shop, i take photos of the jackets, then i would open the photos, and tag it for category,color,prize,model etc... Then i would have a search field based on the tags...

--
Alfo, you have two suggestions.  Either would give you the ability to do some of what you want to do.  Try some blocks and ask a specific question.
At the moment, your questions are indicating you do not know very much about programming, database etc.
I suggest you do the Tutorials:
and read the  AI2 free online eBook   http://appinventor.mit.edu/explore/ai2/tutorials.html   ... the links are at the bottom of the Web page.
and when you know more,
Do these tutorials and read this other documentation  
You have to code the project, so use AI2 (with its limitations) or learn Java and do everything like a professional.  It is up to you.

--
i have already read some documentation tried some tutorials and built some example app, i would just be sure that this project is feasible and i would to be addressed in the right way in order to avoid loss of stupid time in useless components or similar stuffs... Anyway thank you, i think that all yours and Taifun answers could be useful for my project.

--