URL and Link repository

Saturday, September 10, 2016

Upgrade to Google Maps API V2

This is by far the best documentation of Google Maps API V2 vs old Google Maps.

Now I am almost ready to publish latest version of Widespread Augmented Reality II

Widespread Augmented Reality I will continue to use the old Google Maps for phones that do not have Google Play Services installed.

Monday, September 5, 2016

Android Studio Not Starting - Fixed

See previous post of a few days back.

Finally got Android Studio to start consistently, and I debugged the app Widespread Augmented Reality to a Galaxy Tab 2 7 inch tablet.

These are the steps after a fresh installation of Android Studio and Java on an Acer Windows 10 tablet 8 inch 1 GB RAM 32 bit.

  • File | Settings | Build Tools | Gradle > Check Use default gradle wrapper
  • ....Build Tools | Compiler | Check Use in-process build; Check Configure on demand.
  • File | Other Settings | Default Settings | Build Tools | Compiler > Build process heap size (MBytes) : 2048
  • ....Compiler | Android Compilers > Maximum heap size (MB) : 700MB (Note that this could be increased to 2048)
  • Create a gradle.properties in the parent directory and type 2 lines:
    • org.gradle.jvmargs=-Xmx1024M
  • Search on Windows for Environment variables and specify the path for JAVA_HOME
  • Navigate to your Android Studio program folder, e.g. c:/Program Files/Android/Android Studio/bin.
  • Edit or verify .../bin/studio.exe.vmoptions. In my case, I set -Xms512, -Xmx1024 -XX:MaxPermSize=300M
  • Back to Android Studio project and edit the Android.manifest file.
  • <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="24" />
    <application android:label="W.A.R. II" android:icon="@drawable/war4" android:name="android.support.multidex.MultiDexApplication">
  • Finally edit build.gradle (Module app).
    • android {
      dexOptions {
      incremental = true;
      javaMaxHeapSize "1g"

    Thursday, September 1, 2016

    Android Studio Not Starting

    This is the first post of many to come documenting my progress on upgrading the app Widespread Augmented Reality.

    Now that I am the number 45 Travel and Local app in Pakistan with a combined 20K+ downloads worldwide, I am upgrading from Google Maps API v1 to v2. Long time coming, but why fix it if it's not broken? But alas, members of the W.A.R. party deserve better.

    First, a little history.

    2012 - Developed with Eclipse on an Acer Netbook, 1GB RAM.
    2015 - Migrated to Android Studio on an Acer Tablet, 2GB RAM.
    2016 - Somehow broke my Android Studio installation while adjusting settings to work around heap size.

    Determined that JAVA_HOME in environment variables is still correct, but Android Studio still not starting. Here is what I did to correct that.

    Delete everything having to do with Android Studio, except my projects.
    Delete everything having to do with Java
    Download and install latest Java
    Download and install latest Android Studio

    To be continued...

    Tuesday, June 28, 2016

    JSON array to PHP with FOR LOOP

    Here's an example of the input JSON array:

    "dateCreated":"2015-07-09 19:38:46","dateModified":"2016-04-15 15:02:00",

    Here is the PHP that will pull out the first 3 records of the tags JSON array. I realize that it would be better to create a PHP array for tags instead

    foreach ($tagsarray as $tags) {
                for ($i=1; $i<4; $i++) {
                 ${'tagid'.$i} = $tags->id;
                 ${'tagname'.$i} = $tags->name;
                   ${'taggroup'.$i} = $tags->group;
               //echo "tagname1: ".$tagname1."tagname2: ".$tagname2."tagname3: ".$tagname3."
    "; // do nothing after capturing first 3 tags records }
    foreach ($tagsarray as $tags) {
                $tagid[] = $tags->id;
                $tagname[] = $tags->name;
                $taggroup[] = $tags->group;
    $tagid1 = $tagid[0]; $tagname1 = $tagname[0]; $taggroup1 = $taggroup[0];
    $tagid2 = $tagid[1]; $tagname2 = $tagname[1]; $taggroup2 = $taggroup[1];
    $tagid3 = $tagid[2]; $tagname3 = $tagname[2]; $taggroup3 = $taggroup[2]; 

    Monday, June 27, 2016

    Kindle Fire HD 6 Wall Paper Change

    I downloaded a photo from an e-mail and somehow it ended up as wallpaper. I found the pesky file in /data/system/user/0/wallpaper and deleted it.

    Monday, April 11, 2016