Android Installs in 2015

Here are my GLOBAL Android Installs (40,000 sample)

CURRENT INSTALLS 2015 to date



Android 2.3 - 11% - unchanging to slowly decreasing
Android 3.2 - 2% - unchanging to slowly decreasing
Android 4.0 - 13% - unchanging to slowly decreasing
Android 4.1 - 14% - unchanging to slowly decreasing
Android 4.2 - 15%  - unchanging
Android 4.3 - 3% - unchanging to slowly decreasing
Android 4.4 - 26% - increasing
Android 5.0 - 5% - sharply increasing in summer 2015, leveling
Android 5.1 - 3% - sharply increasing since October 2015


DAILY INSTALLS October 2015

Android 4.4 - 50%
Android 4.2 - 20%
Android 4.1 - 8%
Android 5.x - 13%


If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

Android Installs in 2015

Here are my GLOBAL Android Installs (40,000 sample)

CURRENT INSTALLS 2015 to date



Android 2.3 - 11% - unchanging to slowly decreasing
Android 3.2 - 2% - unchanging to slowly decreasing
Android 4.0 - 13% - unchanging to slowly decreasing
Android 4.1 - 14% - unchanging to slowly decreasing
Android 4.2 - 15%  - unchanging
Android 4.3 - 3% - unchanging to slowly decreasing
Android 4.4 - 26% - increasing
Android 5.0 - 5% - sharply increasing in summer 2015, leveling
Android 5.1 - 3% - sharply increasing since October 2015


DAILY INSTALLS October 2015

Android 4.4 - 50%
Android 4.2 - 20%
Android 4.1 - 8%
Android 5.x - 13%


If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

ChildrenTV video submission

We developed ChildrenTV to create a safe app for our children. We review all videos and mark them age appropriate.

We have a lot of viewers speaking many languages, so we are asking you to help us by SUBMITTING your favorite YouTube videos.

How do I submit a new YouTube video to ChildrenTV?

1) Open YouTube app, find your favorite video
2) SHARE the video and a list of apps will appear (email, Fb, etc.) SELECT ChildrenTV



3) Select the appropriate age from the list (e.g. 4+ years old)
4) Select the language the video is in

We will review the video and if everything is good we will add it for everyone to enjoy.

Thank you for helping!

ANDROID DOWNLOAD:
https://play.google.com/store/apps/details?id=com.chicagoandroid.childrentv


As an Amazon Associate I earn from qualifying purchases.

Headlights stay on on Astro while parked

I use my Astro van as camping vehicle, when it gets cold at night I often turn the engine on to warm up. By default the Daylight Driving Lights stay on while engine is running which is very annoying in the campground situation. I found out that pressing Dome Override button 4 times will turn them off.



As an Amazon Associate I earn from qualifying purchases.

Retail Cyber Race


The days of real, brick-and-mortar retail stores are over. Sure, it is still more convenient to jump in your car and drive to the local Walmart or Home Depot and pick up the item you want "now", but that is going away soon, very soon.

Everyone among the big retailers is working on the next day delivery, same day delivery, or next hour delivery, if Amazon will have their way with PrimeAir.
Sure, there still will be the limited-real-estate Galeria of products stores, but they will only be driving online sales. However, I am getting ahead of myself.

A couple of years ago, I was an Architect for Mobile Innovation Group at Sears/Kmart, so naturally I will take that company as example.

Sears/Kmart stores are not doing well, however they could turn around, but how?

A short history lesson: many older Americans remember Sears as catalog business. Every year you've got your booklet from which you were able to select some goodies for your kitchen and for your husband for Christmas. It was great. Then came mega stores and they were great, too, people did not have to wait for weeks on delivery and could shop now. Sears and Kmart had their heyday. Then came Japan, then China and multitude companies started to compete. Then came computers and Walmart bought and used some, Sears and Kmart did not do as well. All suddently the prices got 20% lower in stores like Walmart and Target while offering gt better and nobody could understand what has happened, customers exodus followed.

Then came Amazon, they sold you a book, then another book, then they sold you a TV and then a movie. They also have bougth some computers and used them, used many of them.

Then came Google and the rest of the story will be written in the future, unless...

Let's start with the brand. I am sure there are still a lot of people who like brands like Craftsman, or Kenmore, but honestly it is hard to get a Millenial kid to enter the mall thru Sears entrance. It is hard to change image once the name is stained. Sears launched a program named Shop Your Way, it may work. At this point Kmart and Sears could be called "Red and Blue" and they might have better sales.
 
What is wrong with catalog business? Nothing much, except it has to be created for you, a single person, every day, and has to be short. People like to have a perception of many choices, but immediately they want to narrow it to a couple of choices. If they cannot, they go somewhere else, continue shopping.

So the next question is how do you narrow 10 million products Sears offer to a handful you want to buy today? Amazon knows it, that is why they kick butt, however they are not sharing. Google will know and that is why they may be the biggest danger for all retailers. Facebook is entering the game. Let me explain.

You post something online, Google learns, you like something and Facebook learns, you search, Google learns, you click, they know, you skip, they know. You do that many times, over 10 years. They build a profile of you, they know precisly what you are looking for today, they serve you search results, advertisements and products.

What can "Red and Blue" do about it?  Time for some pointers!

1) Sell everything under the sky, even at the break even, yes, no profit margins. In a sense Sears is doing it already with the offering of 10 million products via 3rd party Marketplace. You need to sell everything because you need to capture most Google product searches. I would go further and have competitors' offering, too. Explanation coming soon.

2) Know your client. By name. So I searched for something and found result, clicked on it and now I see it on "Red and Blue" mobile website. This is opportunity for Sears to learn about me. Me! But what happens, I add the item to the cart and Sears is asking me to log in, I might do that later when I am by the computer because I don't remember the password (OK, it will never happen). I go to kenmore.com, same product, the cart does not know me. Why not allow me to log in with Google+ or Facebook, I know it sounds counterintuitive as you compete with them, but that is what we do these days, we log in with Google+, Facebook, etc, no harm done.

3) Collect data and use it. So now you allow me to log in with Fb, great. I search Google and because you carry millions of products, sooner then later I end up on your mobile website, you know me by name. I am presented with this product, 4.5 stars (however no profit margin) and two other similar products cheaper and more expensive, both 4.7 stars (and nice profit margin). I click around and eventually choose something. I have done that 50 times before and you get to know me among millions other users that have similar tastes and interests.

4) Communicate. I get my daily doze of emails from Sears, Craftsman, Kenmore and Show Your Way - my intuitive opinion? You don't know me! I get $10 in points for oil change, I am not moved, when is the last time I used any offer? How about "How is your Astro van doing, we haven't seen it in a while and honestly we miss it! Come for oil change, we make it worth it! (offer here) You know we have great Carftsman tools you can pick from while we change your oil."

5) Crowdsource information. Engage the user, make it super easy to rate and tell you about the product, yours and your competition's. People buy in one place, tehn come to Amazon to write their product review. We need to ask ourselves why that happens and do better.

6) Make sure you can deliver. As I mentioned Amazon want to air drop your packages using drones and we all have seen on YouTube the Roomba robots turned into their warehouse busboys. Company has to invest in ability to know what your client wants, where they want it, in what quantity and how short the delivery should be to please the customer each time. The company should invest in their own software as using the same package only guarantees that consultants, once they finish with you will go to your competition and offer "improved" version.

Sears and Kmart are currently in process of selling the real estate and investing in the ecommerce, updating their mobile and chain of supply software and winning awards, so there is a real hope to turn the company around.

The summary of this story is that the companies have to learn about their clients and have to use that knowledge wisely to communicate with the client. When I walk in to the store, or enter the website you have to know me, by name and by my interests. You have to connect the dots and heavily invest in machine learning and profiling algorithims.

by Uki D. Lucas

you can find him on LinkedIn.

 



As an Amazon Associate I earn from qualifying purchases.

Belladonna (Atropa belladonna)

Poisonous nightshade.
Contains alkaloids atropine, hyoscamine and scopolamine.
Uses:
Homeopathic use of flowers and leaves for treatment of nausea and spasms.



As an Amazon Associate I earn from qualifying purchases.

git command line on Mac

I had to start using a new Mac, so it was good time to review my toolset.

$ git --version
git version 2.3.2 (Apple Git-55)
$ which git/usr/local/bin/git


After the brew install

brew install git
...
$ git --version
git version 2.2.0
$ which git
/usr/local/Cellar/git/2.2.0//bin/git


it seems that the version of Brew is older, so I advise staying with Apple (Developer's Tools).





If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

git command line on Mac

I had to start using a new Mac, so it was good time to review my toolset.

$ git --version
git version 2.3.2 (Apple Git-55)
$ which git/usr/local/bin/git


After the brew install

brew install git
...
$ git --version
git version 2.2.0
$ which git
/usr/local/Cellar/git/2.2.0//bin/git


it seems that the version of Brew is older, so I advise staying with Apple (Developer's Tools).





If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

Oxalic acid

Oxalic acid present in some greens like spinach binds to the calcium and limits body's absorption of that mineral.



As an Amazon Associate I earn from qualifying purchases.

Fitness Training "CyberFit" version 18

We just released much improved Fitness Training "CyberFit" version 18 for Android:

https://play.google.com/store/apps/details?id=com.cyberwalkabout.cyberfit










As an Amazon Associate I earn from qualifying purchases.

Java: Unsupported major.minor version 51.0

When you get an error:

Unsupported major.minor version X

This means that you are trying to compile your Java program with version lower that the code is written for; for example you develop with Java 1.7, deploy on the server where they have Java 1.6:

Unsupported major.minor version 51.0

The fix is:

  • to change your code to use lower Java, which is sometimes impossible because of 3rd party library that you are using
  • upgrade the other computer to modern Java, which is sometimes impossible because of a brick-head gatekeeper
  • vent on the blog and start cutting out the code 


Java versions:
  • J2SE 8 = 52
  • J2SE 7 = 51 
  • J2SE 6.0 = 50 
  • J2SE 5.0 = 49 
  • JDK 1.4 = 48 
  • JDK 1.3 = 47 
  • JDK 1.2 = 46 
  • JDK 1.1 = 45

If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

Java: Unsupported major.minor version 51.0

When you get an error:

Unsupported major.minor version X

This means that you are trying to compile your Java program with version lower that the code is written for; for example you develop with Java 1.7, deploy on the server where they have Java 1.6:

Unsupported major.minor version 51.0

The fix is:

  • to change your code to use lower Java, which is sometimes impossible because of 3rd party library that you are using
  • upgrade the other computer to modern Java, which is sometimes impossible because of a brick-head gatekeeper
  • vent on the blog and start cutting out the code 


Java versions:
  • J2SE 8 = 52
  • J2SE 7 = 51 
  • J2SE 6.0 = 50 
  • J2SE 5.0 = 49 
  • JDK 1.4 = 48 
  • JDK 1.3 = 47 
  • JDK 1.2 = 46 
  • JDK 1.1 = 45

If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

Organic Garden



As an Amazon Associate I earn from qualifying purchases.

RoboGuice - Android development made simple and fun



"Simple and Fun!" Now, they make quite a promise!

read up:

https://github.com/roboguice/roboguice/blob/master/README.md

https://github.com/roboguice/roboguice/wiki

Maven repo:


org.roboguice
roboguice
3.0.1


OK, so most of all RoboGuice is about DEPENDENCY INJECTION



Examples:


@InjectView(R.id.label)
TextView label;

@InjectResource(R.string.app_name) // strings, drawables
String applicationName;

@Inject // system service
LayoutInflater layoutInflater;

@Inject
LocationManager locationManager;

@Inject // POJO
Book book;


Creating Activities



public class FightForcesOfEvilActivity extends RoboActivity {

@InjectView(R.id.expletive) 
TextView expletiveText;

Creating Android Modules


public class MyModule extends AbstractModule {
@Override
protected void configure() { }



AsynchTask 


public static class AsyncPunch extends RoboAsyncTask {

// Astroboy is a @Singleton public class Astroboy {
@Inject Astroboy astroboy;

// new instance of java.util.Random, since we haven't specified any binding instructions
@Inject Random random;


If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

RoboGuice - Android development made simple and fun



"Simple and Fun!" Now, they make quite a promise!

read up:

https://github.com/roboguice/roboguice/blob/master/README.md

https://github.com/roboguice/roboguice/wiki

Maven repo:


org.roboguice
roboguice
3.0.1


OK, so most of all RoboGuice is about DEPENDENCY INJECTION



Examples:


@InjectView(R.id.label)
TextView label;

@InjectResource(R.string.app_name) // strings, drawables
String applicationName;

@Inject // system service
LayoutInflater layoutInflater;

@Inject
LocationManager locationManager;

@Inject // POJO
Book book;


Creating Activities



public class FightForcesOfEvilActivity extends RoboActivity {

@InjectView(R.id.expletive) 
TextView expletiveText;

Creating Android Modules


public class MyModule extends AbstractModule {
@Override
protected void configure() { }



AsynchTask 


public static class AsyncPunch extends RoboAsyncTask {

// Astroboy is a @Singleton public class Astroboy {
@Inject Astroboy astroboy;

// new instance of java.util.Random, since we haven't specified any binding instructions
@Inject Random random;


If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

SHH key

$ git clone git@github.com:roboguice/roboguice.git
Cloning into 'roboguice'...

Permission denied (publickey).


$ ls -al ~/.ssh
total 120
-rw-------   1 uki  staff   1675 Oct 31  2012 id_rsa


COPY YOUR PUBLIC KEY to clipboard

$ pbcopy < ~/.ssh/id_rsa.pub 


PASTE your SSH key exactly as copied (i.e. in GitHub settings)
https://github.com/settings/ssh


$ git clone git@github.com:roboguice/roboguice.git roboguice
Cloning into 'roboguice'...
remote: Counting objects: 18463, done.

Receiving objects:  15%

If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

Donate Bitcoins



As an Amazon Associate I earn from qualifying purchases.

SHH key

$ git clone git@github.com:roboguice/roboguice.git
Cloning into 'roboguice'...

Permission denied (publickey).


$ ls -al ~/.ssh
total 120
-rw-------   1 uki  staff   1675 Oct 31  2012 id_rsa


COPY YOUR PUBLIC KEY to clipboard

$ pbcopy < ~/.ssh/id_rsa.pub 


PASTE your SSH key exactly as copied (i.e. in GitHub settings)
https://github.com/settings/ssh


$ git clone git@github.com:roboguice/roboguice.git roboguice
Cloning into 'roboguice'...
remote: Counting objects: 18463, done.

Receiving objects:  15%

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    MacBook Pro (late 2011) graphics crashing

    With the update to Yosemite (maybe unrelated) my Mac started to crash, at first it was rare, but right now it is consistent, the common situations when it is crashing:


    • connecting external monitor via HDMI
    • connecting external monitor via VGA
    • screen sharing using JoinMe 
    • bad days in general
    The MacBook Pro (starting with early 2011) have 2 GPU (graphic cards), one integrated, low power, and one additional (discrete) that is used for high power situations.

    I installed the utility called gfxCardStatus that allows me to switch between integrated and discrete graphic cards.

    From their website:

    gfxCardStatus v2.3 and above actively prevents you from switching to Integrated Only mode when any apps are in the Dependencies list (or if you have an external display plugged in). This is because if you were to do this, your discrete GPU would actually stay powered on, even though you've switched to the integrated GPU.

    So I guess no more external display for me until Apple fixes the problem, or I but new MacBook Pro (hopefully with touch screen this time).




    https://developer.apple.com/library/mac/qa/qa1734/_index.html



    Reseting System Management Controller (SMC)

    https://support.apple.com/en-us/HT201295

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    MacBook Pro (late 2011) graphics crashing

    With the update to Yosemite (maybe unrelated) my Mac started to crash, at first it was rare, but right now it is consistent, the common situations when it is crashing:


    • connecting external monitor via HDMI
    • connecting external monitor via VGA
    • screen sharing using JoinMe 
    • bad days in general
    The MacBook Pro (starting with early 2011) have 2 GPU (graphic cards), one integrated, low power, and one additional (discrete) that is used for high power situations.

    I installed the utility called gfxCardStatus that allows me to switch between integrated and discrete graphic cards.

    From their website:

    gfxCardStatus v2.3 and above actively prevents you from switching to Integrated Only mode when any apps are in the Dependencies list (or if you have an external display plugged in). This is because if you were to do this, your discrete GPU would actually stay powered on, even though you've switched to the integrated GPU.

    So I guess no more external display for me until Apple fixes the problem, or I but new MacBook Pro (hopefully with touch screen this time).




    https://developer.apple.com/library/mac/qa/qa1734/_index.html



    Reseting System Management Controller (SMC)

    https://support.apple.com/en-us/HT201295

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Spartan Race prep run

    Run with obstacles.


    As an Amazon Associate I earn from qualifying purchases.

    2015 Spartan Race: training day 1

    I signed up for Spartan, 
    if you want run together, or cheer and take photos, 
    I created a team: "Valeria Warriors" to honor our late grandma who brought this family together.

    Seattle, WA, Saturday 11:15AM-4PM, run start time 1PM (IMPORTANT)
    http://www.spartan.com/en/race/detail/878/overview

    weight: 185 lbs (of flab)

    I might consider Wisconsin Tough Mudder, too:
    https://toughmudder.com/events/2015-wisconsin


    Previous run photo:




    As an Amazon Associate I earn from qualifying purchases.

    Java: Closable

    When working with multiple resources that need to be closed after we are done using, I particularly like the approach of using Closable Interface:


    try {
    // open input streams and use them
    }
    catch (IOException e) {
    e.printStackTrace();
    }
    finally {
    attemptClose(inputSteamA);
    attemptClose(
    inputSteamB);
    }



    private void attemptClose(Closeable object) {
    if (object != null) {
    try {
    object.close();
    }
    catch (IOException ignore) {
    }
    }
    }




    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Java: Closable

    When working with multiple resources that need to be closed after we are done using, I particularly like the approach of using Closable Interface:


    try {
        // open input streams and use them  
    }
    catch (IOException e) {
        e.printStackTrace();
    }
    finally {
        attemptClose(inputSteamA);
        attemptClose(inputSteamB);
    }
    
    
    
    
    
    
    private void attemptClose(Closeable object) {
        if (object != null) {
            try {
                object.close();
            }
            catch (IOException ignore) {
            }
        }
    }
    
    
    
    
    
    
    
    

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Apple Photos opening every time phone USB is connected

    I work developing Android so I plug and unplug different devices all day long. Apple Mac Photos app is opening every time phone USB is connected, which is frustrating and sometimes out of place at work.

    To turn off that behavior next time the Photos app opens UNSELECT THIS CHECKBOX:

    "Open Photos for this device"


    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Apple Photos opening every time phone USB is connected

    I work developing Android so I plug and unplug different devices all day long. Apple Mac Photos app is opening every time phone USB is connected, which is frustrating and sometimes out of place at work.

    To turn off that behavior next time the Photos app opens UNSELECT THIS CHECKBOX:

    "Open Photos for this device"


    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Android: TextView in ScrollView continous scrolling

    Sometimes when continuously outputting text to TextView, you would like it to scroll down:



    textView.addTextChangedListener(new TextWatcher() {
        @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        }
    
        @Override public void onTextChanged(CharSequence s, int start, int before, int count) {
            // scroll down whenever log text updated to display latest info on the screen        
            
            scrollView.post(new Runnable() {
                @Override public void run() {
                    scrollView.fullScroll(ScrollView.FOCUS_DOWN);
                }
            });
        }
    
        @Override public void afterTextChanged(Editable s) {
        }
    });

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Android: TextView in ScrollView continous scrolling

    Sometimes when continuously outputting text to TextView, you would like it to scroll down:



    textView.addTextChangedListener(new TextWatcher() {
    @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    }

    @Override public void onTextChanged(CharSequence s, int start, int before, int count) {
    // scroll down whenever log text updated to display latest info on the screen  
            
            scrollView.post(new Runnable() {
    @Override public void run() {
    scrollView.fullScroll(ScrollView.FOCUS_DOWN);
    }
    });
    }

    @Override public void afterTextChanged(Editable s) {
    }
    });

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Android: AsyncTask delegate

    Let say we have an Activity that wants to receive a messages from AsyncTask.

    
    We create an Interface AsyncResponse
    
    
    public interface AsyncResponse {
       void publishLog(String logContent);
    }
    
    
    We create our AsyncTask:
    
    
    public class FileReaderTask 
    
     extends AsyncTask < Void, Void, List < AbstractX > > {
    // delegate should be set in the Activity   
    public AsyncResponse delegate = null;
    String xyz = "";
    
    
    // ...
    
    
    @Overrideprotected void onPreExecute() {
       delegate.publishLog(xyz);
    }
    
    
    @Overrideprotected void onPostExecute(List x) {
    ...
          delegate.publishLog(xyz);
       }
    }

    Now we can tie together the AsyncTask and Activity:

    public class FileReaderActivity extends Activity implements AsyncResponse {
    
       private static final String TAG = FileReaderActivity.class.getCanonicalName();
       FileReaderTask asyncTask = new FileReaderTask();
    
       private TextView logText;
    
       /**    * Called when the activity is first created.    */  
    
    
     @Override   public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          logText = (TextView) findViewById(R.id.logText);
    
          // tell Async Task that this Activity will listen      
    
    
    asyncTask.delegate = this;
          asyncTask.execute();
       }
    
       /**    * This method will receive log from Async Task.    * @param logContent    */   
    
    
    @Override   public void publishLog(String logContent) {
          logText.append(logContent);
       }
    }
    
    
    
    

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Android: AsyncTask delegate

    Let say we have an Activity that wants to receive a messages from AsyncTask.


    We create an Interface
    AsyncResponse
    public interface AsyncResponse {
    void publishLog(String logContent);
    }
    We create our AsyncTask:

    public class FileReaderTask 
     extends AsyncTask < Void, Void, List < AbstractX > > {
    // delegate should be set in the Activity   
    public AsyncResponse delegate = null;
    String xyz = "";
    // ...
    @Overrideprotected void onPreExecute() {
    delegate.publishLog(xyz);
    }
    @Overrideprotected void onPostExecute(List x) {
    ...
    delegate.publishLog(xyz);
    }
    }

    Now we can tie together the AsyncTask and Activity:

    public class FileReaderActivity extends Activity implements AsyncResponse {

    private static final String TAG =
    FileReaderActivity.class.getCanonicalName();
    FileReaderTask asyncTask = new FileReaderTask();

    private TextView logText;

    /** * Called when the activity is first created. */  

     @Override   public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.
    main);
    logText = (TextView) findViewById(R.id.logText);

    // tell Async Task that this Activity will listen  

    asyncTask.delegate = this;
    asyncTask.execute();

    }

    /** * This method will receive log from Async Task. * @param logContent */  

    @Override   public void publishLog(String logContent) {
    logText.append(logContent);
    }

    }

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Android: finding SD Card

    Since the implementation of SD card is different on various devices use following method:


    private static final String SDCARDFILE 
    Environment.getExternalStorageDirectory() 
    + "/somefolder/somefile.ext";

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Android: finding SD Card

    Since the implementation of SD card is different on various devices use following method:


    private static final String SDCARDFILE 
    Environment.getExternalStorageDirectory() 
    + "/somefolder/somefile.ext";

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    git: updating all repos using Bash

    I have a lot (hundreds) of repositories I want to keep updated on daily basis, here is a handy script I use:


    # saving current working directory
    cwd=$(pwd)

    echo "reading each repo directory in $cwd"
    for repo in *
    do
    echo '#################################################'
    # change to give repo directory
    cd $repo
    # print repo url
        git config --get remote.origin.url
        git fetch
        git status
        # go back to directory you started with
        cd $cwd
    done
    }

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    git: updating all repos using Bash

    I have a lot (hundreds) of repositories I want to keep updated on daily basis, here is a handy script I use:


    # saving current working directory
    cwd=$(pwd)

    echo "reading each repo directory in $cwd"
    for repo in *
    do
    echo '#################################################'
    # change to give repo directory
    cd $repo
    # print repo url
        git config --get remote.origin.url
        git fetch
        git status
        # go back to directory you started with
        cd $cwd
    done
    }

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Toxic woods

    http://www.wood-database.com/wood-articles/wood-allergies-and-toxicity/


    As an Amazon Associate I earn from qualifying purchases.

    8000 grit conditioning whetstone

    This Nagura stone is very small, I will be using it to condition other sharpening whetstones.

    Instructions:

    使用
    方法双方共に水をたっぷりつけて名倉砥石で軽く円を画く様に砥面を, まんべんにこすりすぐ泥が出ますのでそのまま御使用下さい。


    As an Amazon Associate I earn from qualifying purchases.

    Android Studio Canary

    In case you feel adventurous you can try hottest builds from Canary releases:

    http://tools.android.com/download/studio/canary

    Why would you wan to do that?
    For example Android Studio 1.3 (2 days old) has support for NDK.


    As an Amazon Associate I earn from qualifying purchases.

    Android Studio Canary

    In case you feel adventurous you can try hottest builds from Canary releases:

    http://tools.android.com/download/studio/canary

    Why would you wan to do that?
    For example Android Studio 1.3 (2 days old) has support for NDK.


    As an Amazon Associate I earn from qualifying purchases.

    Wooden sawhorses

    No nails, no glue, beautiful.

    https://youtu.be/nsHpJnYInDo



    As an Amazon Associate I earn from qualifying purchases.

    ATAP

    Forget the Google I/O keynote presentation, this is the real "state of the art" of 2015





    As an Amazon Associate I earn from qualifying purchases.

    ATAP

    Forget the Google I/O keynote presentation, this is the real "state of the art" of 2015





    As an Amazon Associate I earn from qualifying purchases.

    Android M Preview May 2015

    https://youtu.be/ndBdf1_oOGA


    As an Amazon Associate I earn from qualifying purchases.

    Android M Preview May 2015

    https://youtu.be/ndBdf1_oOGA


    As an Amazon Associate I earn from qualifying purchases.

    Keyed Scarf Join


    Making complex scarf join using mostly Japanese hand tools

    https://youtu.be/buHsNMVSONQ

    Here is an example how a person can make a complex join using everyday carpentry tools.

    https://youtu.be/6j-U1P49r8U



    As an Amazon Associate I earn from qualifying purchases.

    Linux tail command

    To constantly monitor log files being appended, you can use:


    tail -f /var/log/xyz*.log

    if you want to see last 200 lines added:

    tail -n 200 /var/log/xyz*.log

    note the asterisk "*" symbol, that monitors ALL logs that meet the pattern, which is helpful with log names ending with DATE.


    As an Amazon Associate I earn from qualifying purchases.

    Linux tail command

    To constantly monitor log files being appended, you can use:


    tail -f /var/log/xyz*.log

    if you want to see last 200 lines added:

    tail -n 200 /var/log/xyz*.log

    note the asterisk "*" symbol, that monitors ALL logs that meet the pattern, which is helpful with log names ending with DATE.


    As an Amazon Associate I earn from qualifying purchases.

    Groovy

    Groovy Installation



    $ curl -s get.gvmtool.net | bash

    $ source "/Users/uki/.gvm/bin/gvm-init.sh"

    $ gvm install groovy

    $ groovy -version

    Groovy Version: 2.4.3 JVM: 1.7.0_79 Vendor: Oracle Corporation OS: Mac OS X

    $ which groovy

    /Users/uki/.gvm/groovy/current/bin/groovy


    To add Groovy permanently to your Terminal  PATH

    edit ~/.bash_profile
    # Groovy updated May 19, 2015
    export GROOVY_HOME=/Users/uki/.gvm/groovy/current
    export PATH=${PATH}:${GROOVY_HOME}/bin


    First Script


    groovy_scripts $ cat hello.groovy 

    println 'Hello from Groovy'
    groovy_scripts $ groovy hello

    Hello from Groovy




    Groovy Console


    Groovy Console is good for quick testing of Scripts, especially copy and paste from the Web.


    $ groovyConsole








    interface Alive{
       void alive()
    }

    class Creature implements Alive{
        def grawl() {
            println(" Grrrrrrrr!!! grawls the Creature")
        }
        void alive()
        {
            println(" Grrrrr!!! thinks the Creature")
        }
    }

    class Human extends Creature {
        String name;
        def sayHi(name) {
            println(" Hi, my name is $name! says the Human")
        }
       
        void alive()
        {
            println(" I am alive! says the Human")
        }
    }



    Creature me = new Human()
    me.grawl()
    me.alive()
    me.name = "Uki"
    me.sayHi me.name

    Creature bear = new Creature();
    bear.alive()


    OUTPUT:

    uki@ groovy_scripts $ groovy hello
     Grrrrrrrr!!! grawls the Creature
     I am alive! says the Human
     Hi, my name is Uki! says the Human

     Grrrrr!!! thinks the Creature



    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Groovy

    Groovy Installation



    $ curl -s get.gvmtool.net | bash

    $ source "/Users/uki/.gvm/bin/gvm-init.sh"

    $ gvm install groovy

    $ groovy -version

    Groovy Version: 2.4.3 JVM: 1.7.0_79 Vendor: Oracle Corporation OS: Mac OS X

    $ which groovy

    /Users/uki/.gvm/groovy/current/bin/groovy


    To add Groovy permanently to your Terminal  PATH

    edit ~/.bash_profile
    # Groovy updated May 19, 2015
    export GROOVY_HOME=/Users/uki/.gvm/groovy/current
    export PATH=${PATH}:${GROOVY_HOME}/bin


    First Script


    groovy_scripts $ cat hello.groovy 

    println 'Hello from Groovy'
    groovy_scripts $ groovy hello

    Hello from Groovy




    Groovy Console


    Groovy Console is good for quick testing of Scripts, especially copy and paste from the Web.


    $ groovyConsole








    interface Alive{
       void alive()
    }

    class Creature implements Alive{
        def grawl() {
            println(" Grrrrrrrr!!! grawls the Creature")
        }
        void alive()
        {
            println(" Grrrrr!!! thinks the Creature")
        }
    }

    class Human extends Creature {
        String name;
        def sayHi(name) {
            println(" Hi, my name is $name! says the Human")
        }
       
        void alive()
        {
            println(" I am alive! says the Human")
        }
    }



    Creature me = new Human()
    me.grawl()
    me.alive()
    me.name = "Uki"
    me.sayHi me.name

    Creature bear = new Creature();
    bear.alive()


    OUTPUT:

    uki@ groovy_scripts $ groovy hello
     Grrrrrrrr!!! grawls the Creature
     I am alive! says the Human
     Hi, my name is Uki! says the Human

     Grrrrr!!! thinks the Creature



    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Groovy as DSL

    http://docs.groovy-lang.org/docs/latest/html/documentation/core-domain-specific-languages.html

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Groovy as DSL

    http://docs.groovy-lang.org/docs/latest/html/documentation/core-domain-specific-languages.html

    If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:

    Donate Bitcoins



    As an Amazon Associate I earn from qualifying purchases.

    Post Scriptum

    The views in this article are mine and do not reflect those of my employer.
    I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
    Follow me on:
    X.com (Twitter)
    LinkedIn
    Google Scholar

    Popular Recent Posts

    Most Popular Articles

    apt quotation..