2017년 4월 6일 목요일

Doc for Monetizing Ads Campaigns for My LookFind App.


Monetizing Ads Campaigns for My LookFind App.
I’ve published an app LookFind with ads from MobPartner integrated and assisted from the guidance of:
Scott Ferguson – for Optimized Bubble Sort at - SORT
Dmitri Bailey – for his guidance how to integrate MobPartners ads at - Ads Campaigns.
MIT AI2 team for customizing TinyWebDB service.
After launching the application with ads I started to get updates for the campaigns I’ve subscribed, which to suspend or new ones to add.
Then I realized that every campaign update requires to issue a new version of my app in order to comply with MobPartner requirements.
The solution: I wrote another app AdsManager (source attached) which essentially store the campaigns links in a TinyWebDB and enable to me to remove or update campaigns without modifying my app LookFind.
After you publish your app in without ads in the Play Store, got your approval from MobPartner and subscribed to several campaigns, you have to carry-out the following steps:
For the AdsManager app:
Customize a TinyWebDB Service under your account with a unique name.
Change the TinyWebDB service URL to the one of your customized TinyWebDB here:

Change the TinyWebDB Service Tag to the name of your customized service.
Add the campaigns you have subscribed in the following ADD form
Where you have to enter:
The Campaign Name like:
⦁ The First part of the link after “?s=”  
⦁ The Second part of the link after “&a=”
⦁ Any Optional string after the last “&”
⦁ The Country Code “00” for global campaigns that draw traffic from all over the world or the letters code for a certain country where the campaign is targeted like “US” or “GB”
⦁ Click on the SAVE button, then on the Confirm button to write the campaigns details in your TinyWebDB.
⦁ In case that a campaign is desginated to several countries you have to change only the country code and click on the save and confirm buttons.

Clicking on the VIEW button brings the first campaign details. Hitting the spinner select brings the list of all campaigns and their country codes stored in your TinyWebDB.


Where you select a campain, return and click on the Delete button if you wish to omit it.
I attach also an “ExampleCode” derived from my app LookFind  that shows how to get the user country code and essential code how to get the campaigns links from your TinyWebDB.
You have to change the TinyWebDB tag to same tag that you use in the AdsManager.
Don’t forget to match the TinyWebDB service URL to the same one of the AdsManger.

⦁ The ExampleCode Flow:
·   ⦁ Screen1 Initialize
·   ⦁ AGetUserCountry
·   ⦁ Web1.GotText
·   ⦁ AdsWebDB.GetValue – with your tag to read the TinyWebDB
·   ⦁ AdsWebDB.GotValue
·   ⦁ AdsArrange – to create the campaigns and banners links lists
·   ⦁ Clock_Ads.Timer - Clock_Ads_Bring  - to show the banner image and build the complete campaign link.
·   ⦁ Button_Ads.Click – to access the campaign

Workflow for Updates


My app is done and I'm pretty happy with it. There are some pretty major features I would like to add and I expect there will be as-yet-undiscovered-bugs. How do people deal with workflow to address those things?

My thinking is that I currently have version X of the app. I'll use this to start building new features and so soon version X will be Version Y.

However, if there are easy to fix bugs, I would like to fix those immediately rather than waiting for the new features to be ready. So when I do that I can fix version X and then upload version X.w to Google Play, but then version Y will still have the bug. I guess I can try matching every change made in X in Y, but that seems like asking for something to get missed or messed up along the way, especially when fixes are complicated.

I'm sure this is something people who actually know about programming deal with all the time. How do they/you deal with it?

--
there is no built in version control system for your App Inventor app, you have to do that manually

-- 
Alexandra M asked how to manage two versions of her app, one for release with bugfixes and another for new feature development. This is asking how to do version control with AI2. As she suspects, there are standard ways software developers do this. Several version control systems exist that are nearly independent of the language being used. Git and mercurial are two examples, but they all have similar ideas -- and learning curves. There is the "checkpoint" feature you could use in AI2 for a simple solution. Taifun pointed out that the AI2 development environment doesn't offer much else beyond that to help you manage version control, so you have to do it yourself. But what is it that you should do yourself?

A version control system keeps track of what changes or versions were made, by whom, when, and from what earlier version. Good version control systems offer mechanisms for describing each version's improvements. Saving both the old and new version is sufficient for keeping track of what changes were made. If you use the "save as" or "checkpoint" feature of AI2 every time you make an improvement, your project list will quickly get messy. As a curriculum writer for Project Lead The Way teaching students about software development, I'm interested to hear how teachers are handling this with AI2. We expect student teams in elementary, middle and high schools (the latter two of which are using AI2 along with other development platforms) to maintain intermediate versions and to document their process of incremental improvements. I have a recommendation for AI2 users, but would appreciate discussion of what is working for others.

Here's my recommendation. Think of each AI2 project in the web interface as the leading edge of a branch. In Alexandra's case, she would have two AI2 projects in the web interface: one version that has been released and updated with bugfixes, and a second version for the development of a new feature. When a bug is found, update both projects with the fix. Download the AIA files and keep the record of what versions came from what earlier versions in the filename. Example:
In AI2 website: 


⦁ my_cool_app_release_v1
⦁ my_cool_app_development_v2

On your computer, in a folder my_cool_app:

⦁ my_cool_app_release_v1.01.AIA
⦁ my_cool_app_release_v1.02.AIA
⦁ my_cool_app_release_v1.03.AIA
⦁ my_cool_app_development_v2.01.AIA
⦁ my_cool_app_development_v2.02.AIA
⦁ my_cool_app_development_v2.03.AIA
⦁ my_cool_app_development_v2.04.AIA
⦁ my_cool_app_development_v2.05.AIA

Keep documentation of what those versions accomplished either in a paper project notebook (comp books work great) where you can write lots of text, draw figures, brainstorm ideas, and record business plans, graphics designs, observations of user testing and client meetings. Alternatively, you could append what might be described as a "commit message" directly to the file name. I don't like that option because it would have to be so brief and would need underscores instead of the spaces, quotes, and commas you'd like to use in descriptors. I suppose you could use spaces but change them before uploading an AIA if you ever wanted to go back and look at an earlier version. It would look like this in your local machine's project folder:

⦁ my_cool_app_release_v1.01_initial release
⦁ my_cool_app_release_v1.02_fix misspelling
⦁ my_cool_app_release_v1.03_fix crash from array index out of bounds
⦁ my_cool_app_development_v2.01_duplicates v1.01
⦁ my_cool_app_development_v2.02_add a destroy NSA data button
⦁ my_cool_app_development_v2.03_fix misspelling fast forwards to v1.02
⦁ my_cool_app_development_v2.04_implement NSA login with button
⦁ my_cool_app_development_v2.05_fix crash from array index out of bounds ff v1.03
Your versions in the AI2 web server would be "ahead" of 1.03 and 2.05, with partial improvements. When you're feeling good about your improvements, save on the server like normal but then also download the AIA files and give them a version number in the filename and either an entry in your project notebook or as short text appended to the filename.
When you're ready to release that new feature on the Play Store with my_cool_app_development_v2.102, (and have come to wish that you had named that first one v2.001 so that it all got alphabetized nicely in Windows explorer), you could duplicate that file as my_cool_app_release_v2.01 so that your user base is ignorant of your development branch numbering and only sees bugfixes from there forward on version 2. Another standard thing to do would be let the release be numbered v3.01 and keep odd numbered versions as releases and even numbers as development.

If collaborating with someone, you could put the downloaded AIA files in a shared location (e.g. Google Drive) and append initials to indicate the author of that "commit." Version control systems have tools for merging the work of two people, and in this case you're really out of luck and it will become difficult to know whether v2.03BB came from 2.01BB or from 2.02SP unless you make your filename conventions more convoluted to handle that version control issue.

What other workflows do people use to manage version control with AI2? What experiences do you have implementing these with students at various ages? Anyone doing version control when multiple AI2 developers collaborate?

--

search for updates on chrome store


When you're ready to release that new feature on the Play Store with my_cool_app_development_v2.102, (and have come to wish that you had ...
After launching the application with ads I started to get updates for the campaigns I've subscribed, which to suspend or new ones to add. ... The solution: I wrote another app AdsManager (source attached) which essentially store the campaigns links in a TinyWebDB and enable to me to remove or update ...
I was wondering if there is an easy way to store the budget total as well as any updates to it.. I need to track these updates as they will be in the format ...
Play StoreRecommended: Automatic updates APK FileManual updates required Scan this QR code (or click this link)to get the app from the Play Store ...
The best way to do that is to download it from the Google Play Store on each device. That way, when MIT updates the companion, your device will ...
I hv completed d tutorials.. d problem I m facing is I cannot store al d pictures in d app as d limit is 5 mb.. So do I need to create an online photo ... new updates and images of my clothes n all. >>> If u hv seen the amazon or the ebay ...
this snippet updates the metadata of the image to store it a public folder. to get the folder id, create a new folder in your Google Drive and Share it to ...
Ok so my app is getting regular updates and feedback on the Google play store. However it is now over the MB limit on app inventor so it will not build ...
which can store and filter multiple tables. You can set up tables of ... status updates linked to service requests. This would give you a more auditable ...

Simon Replica Game


Hi! I am making a game for school, and making an app similar to the game Simon, where you replay the colored buttons by memory. I have had very limited experience with App Inventor, and don't even know where to start. I am guessing I have to create a code that repeats itself randomly; however, how then do I create a code that will know if the user correctly replays the series of buttons? I am looking for any and all help regarding making this app. I have already created 4 buttons for the 4 buttons that will be used, as well as two others, pause and restart. I hope this makes sense, I have included a screenshot of what I have already completed. 

You are building a complicated app, even complicated for an expert.

Do we have this correct:
Four buttons that the will start a color sequence, randomly changing the color of each button.  A button will reset using a different random pattern.  We do not know what you want to do with the pause button.

The user has to replay the colors shown in the buttons.

RED   BLUE  GREEN  RED.    Don't you need  eight total buttons?  Four for the app to display, four for the user to touch a pattern?

The  app displays the above pattern, then hides the buttons from the User?

Then the user has   Four buttons,  RED BLUE GREEN ORANGE    and has to properly press   RED  BLUE GREEN RED in sequence perhaps.

Is this the way the game would be played?  Or is this a game I just invented?  :)


You will need a List of four colors to be displayed randomly in the upper buttons.
You will need  write a routine  to randomly pick a color for each of the four upper buttons .... set Button1.BackgroundColor to ..... for each of the upper buttons.
Then using a Clock, you will have the buttons displayed for a number of seconds and then disappear?       Set Button1.Visible to false; Button2.visible to false.etc,
Then the player tries to pick the color sequence Red Blue Green Red.  If he pick the buttons in the correct order he/she wins?    If not, a rooster crows mockingly? ...to do this, the correct sequence has to have been saved somewhere and the squence the play presses has to be recorded, then compared to the original.

Have you workout a chart showing how all this is supposed to work?

Have you done any tutorials?>

We want you to have fun with App Inventor so here are some resources to help you learn to use the AI2 tools  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  .

Does this help you program.    Please continue to ask questions here however if you read the information above, you will not have to wait for answers.

Just try some blocks and have fun.

To make this program, I would make several small Projects, creating the necessary parts for each step in the game.  When you know howw to color the buttons randomly, save the result etc; then put all the pieces together in your Simon app perhaps?

--
Here are the rules ...


You will need to keep a list of button numbers (1-4) representing the button choices made by the game so far.

The list should start out empty, and grow by one random number (1,2,3,4) each round.

You will need 4 sound files, for the 4 buttons.

You will need a global variable to keep track of which step number in the choice list the computer is
going to play next, as the computer plays the sequence for the player to hear.

You will need another global variable to keep track of  how far the player has gotten in the choice list
while trying to mimic what the computer just played.

You will need a global variable to keep track of whether the computer is playing or is listening.

You will probably need a score keeping label too.

You will need to keep a list of button components to use with the Any Button blocks to flash their colors
as the computer plays them.

That should get you started.

--


How to pick the pixel value using cursor?


I am coding with app inventor to extract the gray value of an image at the position of the cursor. I found there is no output for the image module to output the gray values. Any one can give me some clue? 

--
I'm not sure, if I understand what you are asking...
but the canvas has a method to ge the pixel color and background pixel color


number GetBackgroundPixelColor(number x, number y)
Gets the color of the specified point. This includes the background and any drawn points, lines, or circles but not sprites.
number GetPixelColor(number x, number y)
Gets the color of the specified point.

--
I think he's asking how to change a photo to grayscale, and then extract the "gray" value of a specific pixel.

If so, that's not possible with AI.

--
Thank Enis and Taifun for the kind reply. 

Yes. Inspired by Taifun's reply, I tried it in the following way:
1. load the image to the background of the canvas.
2. Use the method in canvas for pixel color extraction.

I suppose the pixel color to be a 3-d vector, but actually it is a number. Anyway, this way it works. I need to find out what the output number really mean and how is it associated with the RGB values.

--

Canvas smooth fade to/from black (or any color)


This is an easy trick to achieve a smooth fade to black effect, (or any color you may want to use).
The secret (!?) is to use a line as thick as the canvas width that goes from the top to the bottom of it. That's right, it will cover it completely.
But we are going to change the alpha value of that line color. In my example I used a slider to allow the user to control the effect, but you can change it for a clock to make it automatic and as fast or slow as you want.
An idea that I had while doing this, is that we can change the canvas background image when the effect is 100% black and reverse the effect (fade "from" black). This will create a nice video-like transition between two different images.
If you want to try different colors, change the button's background colors ONLY. There's no need to change anything else in the blocks. 
While doing it in different colors, I realized that we can use this same effect for "tinting" images with a color.
An easy trick that offers a lot of possibilities. 






--
very nice!

--

Neat trick Italo!

--
Cool :)

--

RGB <-> CMYK conversion app


A simple app that makes a conversion between RGB <-> CMYK color modes. It actually shows an estimated CMYK color on screen that matches the RGB color shown.

This app allows people to see the difference between a color in RGB mode and CMYK mode. If you don't know what these are, the RGB (red,green,blue) color mode is additive (light) while CMYK (cyan, magenta, yellow, black) is a substractive color mode (ink). When you need to show people why the colors they see on screen (RGB) can't be perfectly reproduced in printed material (CMYK), this app might come in handy.

I hope somebody finds it useful.  ai2.appinventor.mit.edu/?galleryId=5433155909058560

--

Code colors in App inventor. RGB-opacity. Get color. Pick color.


These days I'm studying the colors in App Inventor.

I have posted tutorials about colors, but...  ummm are in Spanish, but maybe can help someone.

In Spanish RGB is (Rojo, Verde, Azul) RVA.

1. This about subtraction color (CMYK):


2. In this app you pick color over image Canva and get RVA

If color is R= 240, V = 130, A = 80 then get Color = -1015216

Sub ConvertLongToRGB(ByVal Value As Long, R As Byte, G As Byte, B As Byte) 
R = Value Mod 256 
G = Int(Value / 256) Mod 256 
B = Int(Value / 256 / 256) Mod 256 
End Sub

Color = RVA - 16777216


3. In this tutorial you set R = 240, V = 130,  A = 80,  opacity = 255 and get Color =  4293952080

 N = A + (V + (R + (256 x opacidad)) x 256 ) x 256


4. This about opacity:


5. This is an app by Italo about RGBtoCMYK


--
Very complete study. And thanks for the mention!
You might find this app I made about fading interesting too: Canvas smooth fade to/from black (or any color)

--


color picker


Hi! I'm pretty new to this kind of programming. 
I'm making the paint pot app and instead of selecting colors by pressing different buttons I Wanted to put all the thing together by using one single button(color selector) that allows you to pick the color you want.The picture I attached clarifies my idea. is there any way to do so?
--
Oh my.  Use a Canvas.   Place 16 sprites (that are boxes of the colors you will use).    Use the touchdown events of each sprite to select the color AI2 knows (the color associated with the touchdown event.  What you do here is use the sprites like buttons.

or, Using a Table Layout,; 2 rows by 8 columns;   Place a button in each.  Set the background color of each button to the colors you want.   Set the text of the button to nothing and/or set the button text to none.  Also size each button H and W   to perhaps 20 x 20 ... then in the event handler of each button, place the code to change the color...

or .... your imagination is as good as mine I suspect.  Try your own ideas.    Make a simple test project called colors, and make this work like you want it to work?

Oh, and you would hide the Canvas initially (or the Table arrangement) and call it with a button that would change the visibility of the component/layout to true.

--