Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Friday, December 9, 2016

Root the Samsung Galaxy Tab A6 (2016) SM-T280

Follow these instructions precisely. Root Samsung Galaxy Tab A SM-T280

The process involves using Odin to install TWRP (Team Win Recovery Program) and then using TWRP to flash SuperUser and a SM-T280 boot image.

Wednesday, November 30, 2016

Microsoft Outlook Live and Adding a Hotmail account

outlook.live.com serves as an e-mail client on the cloud. Therefore, one should be able to add multiple e-mail accounts under a single outlook.live.com sign in.

This is not simple when one of your emails is a Hotmail account, because when you login to your hotmail.com account, the host switches to outlook.live.com.

Now how are your going to be logged in two outlook.live.com accounts at the same time in the same browser window/tab?

You are not.

But then how to you add the emails from your Hotmail account to your Outlook.live.com account open in the browser?

Google it; however, all the documentation on-line is incorrect and inconsistent including Microsoft's own instructions.

After experimenting with various IMAP and POP server configurations, this is what worked.

Thursday, November 17, 2016

CSS for 3 Divs Side by Side and Centered

//  Create a centered wrap block that holds 3 blocks aligned horizontally
.wrap{
text-align: center;
margin: 0 auto;
padding: 5px;   
}
.left{
display:inline-block;
vertical-align:top;
margin: 10px;
color: white;
padding: 5px;
opacity:0.60;
filter:alpha(opacity=60);
border-radius: 10px;
background:#037DAE
}
.center{
display:inline-block;
vertical-align:top;
opacity:0.60;
filter:alpha(opacity=60);
color: white;
background:#037DAE;
padding: 5px;
margin: 10px;
border-radius: 10px; 
}
.right{
display:inline-block;
vertical-align:top;
color: white;
margin: 10px;
padding: 5px;
opacity:0.60;
filter:alpha(opacity=60);
border-radius: 10px;
background:#037DAE
}
The above CSS renders this site: dfx.dataforge1.com

Sunday, November 13, 2016

Acer Iconia W3-810 drivers

The latest Windows 10 update on subject device messed up the sound.
Rather than rollback the update, I downloaded and installed drivers from
Real Acer Drivers

Thursday, November 10, 2016

Embed Video in a Web Page

Need a modern browser, one that supports the Video HTML tag.
And of course you will need to convert your video to the supported formats listed below.
Do your own search so I don't risk posting broken links.

Tuesday, November 8, 2016

Bricked my Kindle Fire HD 6

I stupidly, disabled system apps that I should not have messed with. Now the Kindle only flashes the wallpaper. Doieeee! Help.

But there is no need to panic, because I picked up a WiFi enabled Android TracFone for $9.99 at my neighbor hood Ralphs grocery store.

I installed the Kindle app as well as other useful ones and moved them to the external SD card.

Now I can take my time in trying to unbrick the Kindle Fire HD 6. Any ideas?

Meanwhile, I think I need to start here.

Macromedia Fireworks - Adding Fonts

After all these years, I learned something that I should have known. It is actually one of those things that I did not know that I did not know. Weird. In order to add custom fonts to a favorite graphics program, like Fireworks or GIMP, one must first download the font's TTF file and double click to install to Windows fonts. Searching for "Fonts" on the PC, one will find a Fonts folder. Anyhow, once the font is installed to the Windows Fonts folder, then Fireworks will pick it up as an text option. I discovered this when experimenting with a logo for my new IT consulting firm. More on that later.

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.
mobisys.in

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
      org.gradle.daemon=true
  • 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:

    "tags":[{"id":1306,"accountID":4936,"name":"BURTON","group":"Rep","type":0,
    "dateCreated":"2015-07-09 19:38:46","dateModified":"2016-04-15 15:02:00",
    "isDeleted":false,
    "isActive":true,"numOrders":0,"abort":false,
    "currentClass":"Tag","_jsonSkipsReadOnly":false}],

    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

    Sunday, April 10, 2016

    Almost Bricked Kindle Fire HD 6 4th Generation

    Now that I have successfully corrupted my tablet, e.g. I can't uninstall some apps and I cannot seem to open Google Play.
    The only thing that is different is that I now have Linux running in chroot.
    My solution is to start over.
    Luckily I can still adb recovery boot into TWRP, because I am still on the 4.5.3 version of the software.
    First, I download a newer Amazon OS on to the tablet. I found download links on XDA. In fact you can stop reading now and try to follow the XDA instructions.
    Anyway here is what I did:
  • Downloaded the Amazon OS file to my PC and renamed it from .bin to .zip (this is done by disabling hide extensions in the file manager).
  • Connect Fire HD 6 to the PC and type "adb reboot recovery".
  • Copy the renamed .zip file to Downloads.
  • Choose install in TWRP and select the .zip file.
  • If all goes well, you will probably end up with the new OS and UI, but no recovery program as TWRP was overwritten.
  • Find and download the 5.2.0_stock_recovery_uboot.zip to your tablet.
  • Find, download and install Flashify. (Google Play version for reference)
  • Start Flashify and flash the stock recovery file.
  • An "adb reboot recovery" revealed that a recovery program is still not available.
  • I choose to skip loading a recovery and root the tablet via KingRoot. Be patient and try several times.
  • Once rooted, you can research your self on how to install a recovery program and Google Play.
  • I opted just to install Google Play.

    Look for my next post, which will likely be called Corrupted the Kindle Fire HD 6 4th Generation (AGAIN!). BTW I am doing all this because I essentially got the new 16 GB tablet for $40 off Amazon.

    Oops, I almost forgot that I need to turn off automatic updates. Here's a how-to on YouTube.

  • Saturday, April 9, 2016

    How I Finally Installed Kali Linux on a Kindle Fire HD 6 4th Generation

    I followed these steps but improvised when needed. Also at some point you will need to know that the default password is "changeme".
  • Linux Deploy
  • Install VNC
  • Kali documentation
  • Tech Worm

    The hard part is navigating around the tiny desktop with a mock mouse cursor. Swipe down from the top to use a keyboard.

  • Wednesday, April 6, 2016

    Part II - Kali Linux on Kinde Fire HD 6

    Okay, there is more to installing Kali Linux than what is listed in yesterday's post.
  • At first, the original Complete Linux Installer apk was not opening the Terminal.
  • I found a Kali Linux installer at Linux on Android.
  • Then I downloaded the Terminal from Google Play.
  • Now after opening the new Complete Linux Installer, the Launch button opened up the terminal.
  • After starting the VNCserver in the Terminal window, I start VNC Viewer from Google Play
  • The default password for the VNCserver is "kalilinux" and the address is "localhost::5900".
  • After connecting, I get a blank screen. Booo!
  • Stay tuned for a resolution or reply with one. Thanks.

    Tuesday, April 5, 2016

    Kali Linux on Kinde Fire HD 6

  • First of all I am doing this with 16 GB internal SD storage.
  • Second, be root user.
  • Third, download the Linux Installer and follow instructions.
  • Finally, make sure you can connect the Kindle Fire to your PC as you may find it easier to navigate to the after market sites for the necessary APKs, e.g. Zip extractor or Root Browser, and then copy the APK to your Kindle Fire and install them.
  • Buena suerte amigos y amigas

    Adding GPS to the Kindle Fire HD 6 inch Tablet

    I purchased the GlobalSat ND-105C Micro USB GPS Receiver from Amazon.
    Then I thought I made a mistake until I did the following.
  • Enabled mock locations under Developer Options in the settings.
  • Checked on install third party apps under Developer Options
  • Downloaded You Are Here from outside Google Play and Amazon market, because it will not show as available for the Kindle Fire (no native GPS).
  • Installed and connected You Are Here to the plugged in USB GPS receiver.
  • Fired up Google Maps and confirmed my current location.
  • Still testing to see if TetherGPS is necessary.

  • I am concerned that the Kindle Fire does not have a USB powered port, but You Are Here is getting coordinates anyway. I just need to see if it's getting coordinates from the GPS dongle. I could use USB OTG apps to analyze the port.

    Wednesday, March 30, 2016

    Root Amazon Kindle HD 6 Fire tablet

    Why? Install Google Play and access that universe of apps.
    How? Don't reinvent the wheel: Gather information from the following sites and see what works.
  • Developer Mode: Kindle Fire for Kid
  • Android Debug Bridge (ADB) and files: Bilal El Tayara
  • Root: Android MTK
  • Prevent breaking root: Groovy Post
  • Very cool video

    Good luck and enjoy.

    Tuesday, March 29, 2016

    AsynHttpClient and SpiderOnFire Augmented Reality app

    I am using this code to affect faster uploads without locking the main UI for the app at SpiderOnFire

    Wednesday, March 16, 2016

    Bypass a Password Locked PC

    Recently, a customer became confused when AT&T was assisting her with resetting a password. Why they were resetting a password is a mystery. But the net result was that my customer could no longer login into her PC with the old password nor the new. She was locked out.
    Here is how I helped.
    1. Turn on laptop and hit PF2 to access bios set up.
    2. Change the boot order to have the USB port at the top.
    3. Turn off PC, insert Hiren's boot USB, and then turn on PC.
    4. Boot into Windows Mini XP
    5. Search programs for a Password program that will create a new Administrative account on the PC.
    6. Create the administrative account and turn off the PC.
    7. Turn on the PC, log in to the new administrative account and navigate to User Accounts.
    8. Select the original user account and remove its password.

    Friday, March 11, 2016

    XAMPP and Bootstrap

    After successfully installing an Apache server on your rig (see previous post), now install some webpage templates via Bootstrap

    Here is how I did

    At first blush, Bootstrap looks like a directory structure that can be copied into c:/xampp/htdocs (this is where I installed XAMPP). So I just downloaded the source code files, unzipped and moved to the c:/xampp/htdocs directory. Did this work right out of the box? No.
    That is because, I copied the standard "Hello World" html from Bootstrap into a file called bs1.html and typed

     http://localhost/bs1.html
    into the browser.
    Viewing source and debugging, I found that certain files in the directory were not found, so I just moved them to where the HTML expected them to be.
    Kind of clunky, no?
    Yes, so I installed
  • node.js
  • bower
  • and
  • git.
  • To be safe, I navigated to the
    c:/xampp/htdocs
    directory before installing.
    Then I ran
    bower install bootstrap
    from inside the
    c:/xampp/htdocs
    directory.
    Now after studying the directory, I found that
    http://localhost/docs/examples/jumbotron-narrow/index.html
    opens up a nice little template.
    How is using Bootstrap any different then just modifying CSS files? I do not yet know. More may be revealed.

    Tuesday, March 8, 2016

    XAMPP on Windows 10

    After installing XAMPP, any attempt to start Apache from the control panel was met with port blocked.
    The solution is to right click and run as administrator. Then click the shell button and type: sc stop w3svc.
    ____________Screen shot shell_____________________________
    Setting environment for using XAMPP for Windows.
    sal@MYA55 c:\xampp
    # sc stop w3svc

    SERVICE_NAME: w3svc
    TYPE : 20 WIN32_SHARE_PROCESS
    STATE : 3 STOP_PENDING
    (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
    WIN32_EXIT_CODE : 0 (0x0)
    SERVICE_EXIT_CODE : 0 (0x0)
    CHECKPOINT : 0x1
    WAIT_HINT : 0x4e20

    sal@MYA55 c:\xampp
    #
    ____________End of screen shot shell_________________
    Now typing
    http://localhost
    in your browser should yield:

    Sunday, February 21, 2016

    X509 Trust Manager Interface Resolved

    My Android app WAR had been using an imported version of the Application Crash Reports for Android (ACRA) library that was implemented incorrectly. The external JAR was acra-4.2.3.jar, which I automatically assumed to be outdated.

    Therefore, I downloaded and copied acra-4.8.2.jar to the app/libs directory in Android Studio. Here are the series of steps that I took to find that updated ACRA jar file.

  • Started with a Bing search on acra-4.2.3.jar
  • SERP came back with
    https://code.google.com/archive/p/acra/wikis/ACRA3HowTo.wiki
  • This led to
    https://code.google.com/archive/p/acra/
  • Then to
    https://github.com/ACRA/acra
  • Which pointed to
    https://github.com/ACRA/acra/wiki/BasicSetup
  • Then
    http://search.maven.org/#search%7Cga%7C1%7Cch.acra
  • And finally arriving at
    https://repo1.maven.org/maven2/ch/acra/acra/4.8.2/acra-4.8.2.zip
  • After unzipping and copying the jar file to Android Studio app/libs directory, I modified the build.gradle file as follows:

    dependencies {
    compile files('libs/httpmime-4.1.1.jar')
    compile files('libs/acra-4.8.2.jar')
    }

    Mission accomplished for now at least; however, I certainly realize that I may have just added to my tech debt, but if it's working now, I won't risk introducing new bugs.

    Friday, February 19, 2016

    X509 Trust Manager Interface

    This is the warning letter from Google to fix the unsafe implementation of the interface X509TrustManager

    My fix will be posted shortly.

    Hello Google Play Developer,
    Your app(s) listed at the end of this email use an unsafe implementation of the interface X509TrustManager. Specifically, the implementation ignores all SSL certificate validation errors when establishing an HTTPS connection to a remote host, thereby making your app vulnerable to man-in-the-middle attacks. An attacker could read transmitted data (such as login credentials) and even change the data transmitted on the HTTPS connection. If you have more than 20 affected apps in your account, please check the Developer Console for a full list. 
    To properly handle SSL certificate validation, change your code in the checkServerTrusted method of your custom X509TrustManager interface to raise either CertificateException or IllegalArgumentException whenever the certificate presented by the server does not meet your expectations. For technical questions, you can post to Stack Overflow and use the tags “android-security” and “TrustManager.”
    Please address this issue as soon as possible and increment the version number of the upgraded APK. Beginning May 17, 2016, Google Play will block publishing of any new apps or updates containing the unsafe implementation of the interface X509TrustManager.
    To confirm you’ve made the correct changes, submit the updated version of your app to the Developer Console and check back after five hours. If the app hasn’t been correctly upgraded, we will display a warning.
    While these specific issues may not affect every app with the TrustManager implementation, it’s best not to ignore SSL certificate validation errors. Apps with vulnerabilities that expose users to risk of compromise may be considered dangerous products in violation of the Content Policy and section 4.4 of the Developer Distribution Agreement.
    Apps must also comply with the Developer Distribution Agreement and Content Policy. If you feel we have sent this warning in error, contact our policy support team through the Google Play Developer Help Center.
    Regards,
    The Google Play Team
    
    ©2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
    Email preferences: You have received this mandatory email service announcement to update you about important changes to your Google Play Developer account.
    
    Affected app(s), version(s), and class(es):
    org.warmixare 
    89 
    org.acra.util.NaiveTrustManager;
    
    org.warmixare2 
    93 
    org.acra.util.NaiveTrustManager;
    
    

    Friday, January 22, 2016

    What is Hashing?

    Culled directly from Webopedia

    Producing hash values for accessing data or for security. A hash value (or simply hash), also called a message digest, is a number generated from a string of text. The hash is substantially smaller than the text itself, and is generated by a formula in such a way that it is extremely unlikely that some other text will produce the same hash value.

    Hashes play a role in security systems where they're used to ensure that transmitted messages have not been tampered with. The sender generates a hash of the message, encrypts it, and sends it with the message itself. The recipient then decrypts both the message and the hash, produces another hash from the received message, and compares the two hashes. If they're the same, there is a very high probability that the message was transmitted intact. Hashing is also a common method of accessing data records. Consider, for example, a list of names:

  • John Smith
  • Sarah Jones
  • Roger Adams
  • To create an index, called a hash table,for these records, you would apply a formula to each name to produce a unique numeric value. So you might get something like:

  • 1345873 John smith
  • 3097905 Sarah Jones
  • 4060964 Roger Adams
  • Then to search for the record containing Sarah Jones,you just need to reapply the formula, which directly yields the index key to the record. This is much more efficient than searching through all the records till the matching record is found.

    Thursday, January 7, 2016

    Select Last Row of MySQL Table (Or the very first entry to the table)

    Here are two ways where the table index is auto-incremented:

    select * from myTable where myIndex = (select MAX(myIndex) from myTable); 
    

    select * from myTable order by myIndex asc limit 1;
    

    Which one is more efficient?

    By the way, one can also select the latest entries from a MySQL table with:

    select * from myTable order by myIndex desc limit 4;