Widespread Augmented Reality

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

Monday, December 22, 2014

Eclipse Juno and the Android Dev Tool Kit Error

Using the Android SDK manager in Eclipse, I updated my installation with Android SDK 24.0.2. Upon restart, a message warned that the SDK requires the next iteration of the Android ADT plugin. Installing new software through the Help option will not work unless you first uninstall the current ADT plugin through Help > About Eclipse > Installation details. See the screen shot below.




Monday, December 8, 2014

Notes on Security Panel

In November, I attended a Security Panel hosted by Tech in Motion in Santa Monica, CA. The following are notes to myself

Panelists:

  • Spokeo
  • Card
  • Gem
  • "If a product is free, then you are the product."

    "Apple is good at changing consumer behavior."

    "Credit card fees are high because of the inherent risk of using them."

    Bitcoin is peer to peer

    Credit card (magnetic) vs cell phone(trust chip).

    SpiderOak

    One time pad

    "People, process, technology."

    Encrypt in transport vs securing data at rest

    Box vs DropBox

    Two factor authentication

    PCI vs HIPPA

    Bitcoin is decentralization

    SpiderOnFire is dead drops and dead letter boxes in the sky.

    About the data

    Big data brokers

    Widespread Augmented Reality uses disposable anonymous handles stored in your head and messages embedded in image files.

    Tuesday, December 2, 2014

    Custom Android Image Button with Animation

    If using an image button with a custom background, then the usual touch animation is lost. In order to affect an animation upon touch or click, I created one custom_background.xml that references two backgrounds: a touched background and a default background.

    Default background XML in drawable folder (rect_drawable.xml):


    Touched background XML in drawable folder (rect_drawable2.xml):



    This is the background referenced on each button (custom_back.xml):



    The image button's XML would look like this:


    Friday, November 14, 2014

    My PHP Code for Resizing Images into a Second Directory.

    function compress_image($orig_url, $new_url, $quality) {
    $info = getimagesize($orig_url);
    if ($info['mime'] == 'image/jpeg') 
    $image = imagecreatefromjpeg($orig_url);
    elseif ($info['mime'] == 'image/gif') 
    $image = imagecreatefromgif($orig_url);
    elseif ($info['mime'] == 'image/png') 
    $image = imagecreatefrompng($orig_url);
    imagejpeg($image, $new_url, $quality);
    return $new_url;
    }
    $sql = "SELECT
    `idtags` as `id`,
    `lat`,
    `lng`,
    `height` as `elevation`,
    `title` as `title`,
     '0' as `distance`,
     '1' as `has_detail_page`, 
    `url` as `url`,
    `created` as `when`,
    `private` as `priv`
    FROM `tags` order by `created` desc;";
    $result = mysql_query($sql) or trigger_error 
    ('JSON download error'.mysql_error(),E_USER_ERROR);
    for ($i = 0; $i < mysql_num_rows($result); $i++){
    $row = mysql_fetch_array($result);
    $imgUrl = $row['url'];
    $title = $row['title'];
    $url = str_replace("%3A",":", $imgUrl);
    $url2 = str_replace("%2F","/",$url);
    $name = substr($url2, 29);
    $url4 = "myNewImageFolder/".$name;
    compress_image($url2, $url4, 75);
    }
    

    Thursday, November 13, 2014

    Android: Command Line SQLite

    On my Samsung Galaxy Tab 2 running Cyanogemod Kit Kat under a second user account, my databases are under the following directory: "/user/10/com.s33me.scribpass2/databases". Then I type: "sqlite3 scribdb2" followed by ".tables";

    Thursday, October 23, 2014

    Subscription Button for PayPal

    Apparently, the subscription HTML cannot pass all the custom fields to the confirmation emails. One can use item-name and Invoice Number to hold user entered text; however, the invoice number must be unique and there will be problems if it is not.

    See the PayPal documentation

    Saturday, September 27, 2014

    PayPal - "Problems with seller's site..."

    I produced a classic PayPal button with a drop down menu for pricing options. All my tests took me to PayPal.

    My end user reported receiving "Problems with seller's site".

    I created a new button and unchecked the hosted at PayPal option in step 2.

    The problem seem to be solved, but I needed to know why both buttons worked for me and not the end user.

    I found that recreating the button as not hosted at PayPal was not the correct solution.

    The correct solution was to remove the special characters in one of the menu options, which read "Individual (Ltd. Qty).".

    Lesson: do not use special characters in the labels for any pricing option.

    Saturday, September 20, 2014

    Create a Pay Pal Sandbox Button

    In order to create a test PayPal "Buy Now" button, follow these steps.

  • Create a real PayPal account.
    https://www.paypal.com
  • Login to PayPal's developer platform with credentials from step 1.
    https://www.developer.paypal.com
  • Click through Dashboard | Sandbox->Accts and you should see a similar screen.

  • The facilitator account is a test merchant that is automatically generated.
  • Create a fictitious personal account for testing.
  • Click on the facilitator merchant account to view the profile, which has login credentials.
  • Click "Enter Sandbox site" and login with the facilitator credentials.
    https://www.sandbox.paypal.com
  • Click Merchant Services tab and then My Saved Buttons.
  • You will notice that the link takes you to PayPal production.
  • Change the URL in the browser address field to include "Sandbox" qualifier, e.g.
    www.sandbox.paypal.com/c2/cgi-bin/webscr?cmd=_button-management
  • This could fail several times before working.
  • Make sure that your browser is pointing to sandbox when you finally get a "My Saved Buttons" screen.
  • Click on create buttons, make sure the browser is pointing to sandbox and follow instructions.
  • Eventually paste the HTML code into your website and pay with the personal sandbox account.

    I suppose I can make a cURL or a Python script to do all this.

  • Saturday, August 2, 2014

    Modifying Windows 7 Registry for Internal CD-DVD drive.

    Once you locate the DVD register using "regedit", then you must delete UpperFilters and LowerFilters in the right pane.  Also you may have to copy the old C:\Windows\System32\drivers\cdrom.sys to the new Windows directory.

    Friday, July 25, 2014

    SQLite Refresher

    In order to view databases that your Android app creates, please follow these steps.

    1. Plug device into PC through USB data cable.
    2. Fire up DOS prompt window.
    3. adb devices (This will confirm that you are indeed connected)
    4. adb shell (Gets you into Android Debug mode)
    5. su (Need root access to the Linux file system)
    6. cd data/data/[your package name] (For example, cd /data/data/ com.s33me.cashburn)
    7. cd databases
    8. ls (This will list the databases)
    9. sqlite3 [database name] (For example, sqlite3 cashdb)
    10. .tables (lists tables in the database)
    11. Use SQL from this point on. (See Command Line Shell for SQLite)

    This is probably more for me than for you, because I'll probably forget in the next 1/2 hour and start using DB2/SPUFI commands.




    Friday, July 18, 2014

    Cash and Burn

    My latest Android app is one that I use daily to simply track cash withdrawals and debit card purchases. See CashBurn on Google Play.  This would be nice to have on a watch.

    Saturday, June 21, 2014

    Android Cube - Work in Progress

    A cube consists of 6 equal squares joined at right angles in a three dimensional space where X is the horizontal axis, Y is vertical and Z represents depth.

    So in the diagram below where the side of each square is a length of 2, one would define vertices A, B and C in terms of (X, Y, Z) as follows:

    A. (-1, +1, -1):
    B. (-1, -1, -1);
    C. (+1, -1, -1);

    Note that every Z value on the front facing square will be -1; the Z values on the rear square will be +1.


    Friday, June 6, 2014

    ICE Cyber Crime Center Virus

    Sony VAIO came into shop with the Windows Vista desktop blocked by a fraudulent screen requesting ransom. Here's what I did to the customer's satisfaction. 
    •  Power on while tapping F8, but no back up to restore
    •  Power on with F2 or F12 for BIOS set up
    •  Change boot order: 1.CD, 2. USB, 3. HD
    •  Power on with hiren boot USB. 
    •  Copied bootmgr from D to C, but still locked out on restart.
    •  Use hiren's Windows mini XP to back up user data.
    •  Power on while tapping F10 and wipe C: to original factory.
    • Advise user not to surf internet as administrator.







    Wednesday, May 21, 2014

    Stock Market and Options Trading App on Google Play

    This site at finance.avafin.com would be a good feed into my market analysis app at Google Play

    I'll get working on it. For now, maybe I'll just create a webview to make things simple.

    Meanwhile, here is a link to all my financial apps at Google Play.

    Tuesday, May 20, 2014

    Android Integrated Development Environments


    Android Studio         Eclipse           AIDe



    Installation: 
    Good on Linux Good on Windows Good on Tablet
    Interface Google style clean Lots of tools Good for tablet
    Debugging Better debug pane Inconsistent and slow LogCat on device
    Compilation Slow Slow Slow
    Speed Okay on Linux Slow on Windows Okay on tablet
    Publishing Fluid and keystore built in Multi-step and awkward Fluid and keystore built in

    Wednesday, April 23, 2014

    We Work Tech Meet Up in Hollywood

    A fireside chat with Grindr's Lukas Sliwka covered the following:
    • Scalability from PHP to Java and Ruby on Rails.
    • Do not reinvent the wheel
    • Sanitizing member profiles
    • Approving user uploads
    • User analytics to user preferences
    • Pattern recognition and heuristics
    • Shortened deliverable cycles.
    • App ratings and client app crashes

    Friday, April 18, 2014

    More Enhancements to the W.A.R. app at Google Play

    The Widespread Augmented Reality networking app at Google Play allows both photos and notes to be posted at geographical points of interest.

    The Camera activity implies an intent with:

    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    intent.putExtra(MediaStore.EXTRA_OUTPUT, pictureFile);
    startActivityForResult(intent, TAKE_PICTURE);

    The EXTRA_OUTPUT is passed as the "data" argument to:

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    The data is then passed to the activity ImageView field with the following conversions:

    case TAKE_PICTURE:
           
            try {
            Uri picFile = data.getData();
            String picPath = picFile.getPath();
            yourSelectedImage=BitmapFactory.decodeFile(picPath,ops);
            getChosenImage().setImageBitmap(yourSelectedImage);

    The Note activity is proprietary, for now. Notes are saved as images and BLOBs and therefore not susceptible to nosy bots or web crawlers.

    Sign up with an anonymous handle at SpiderOnFire (a reference to enhanced web crawling).

    Thursday, April 17, 2014

    Recover Full Capacity of USB Drive

    1) Type "DISKPART" from the Command Prompt 
    2) Type "LIST DISK" to see what number your USB drive is listed as.
    3) Type "SELECT DISK 2" 
    4) Type "SELECT PARTITION 1" 
    5) Type "DELETE PARTITION". 
    6) Type "CLEAN". 
    7) Type "CREATE PARTITION PRIMARY" to create a new, full-size partition.
    8) Type "EXIT"
    Now create a boot disk with http://pogostick.net/~pnh/ntpasswd/bootdisk.html

    Thursday, April 10, 2014

    W.A.R. Party enhancement

    Major enhancement to Widespread Augmented Reality app with the Gallery button: W.A.R. Party

    Sunday, March 30, 2014

    SpiderOnFire and the Companion Android app

    I maintain a database of geotagged images at SpiderOnFire. The companion Kit Kat targeted app at Google Play retrieves the images but does not resize them. Rather I have the PHP download script do the work. Here is my code:

    array('header'=>'Connection: close\r\n'))); $orig = file_get_contents("$dirfile",false, $context ); $imgstr = imagecreatefromstring($orig); $width = imagesx($imgstr); $height = imagesy($imgstr); $newwidth = '75'; $newheight = '50'; $thumb = imagecreatetruecolor($newwidth, $newheight); imagecopyresized($thumb, $imgstr, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); header("Content-Type: image/jpg"); imagejpeg($thumb); //image as jpg imagedestroy($thumb); imagedestroy($imgstr); ?>

    Sunday, February 23, 2014

    Passwords Done Right

    This article is a keeper: Salted Password Hashing.

    Side note: My own mobile web app is secure in so far as the hashed password only validates the anonymous and disposable handle or user ID, nothing else. This allows a member to delete their handle and recreate it with a different password as needed. Moreover, the arbitrary handle is not linked to any e-mail or other vitally important personal data.

    Tuesday, February 18, 2014

    Newest Android App

    I designed, coded and published using the following tools installed on a Samsung Galaxy Tablet 2.0 with a 7 inch screen.

  • AIDE
  • Hackers' Keyboard
  • Mock Ups
  • This is the app with fragments in the UI: P.Y.T

    Saturday, February 1, 2014

    Installing Android Studio

    I have a dual boot Acer Aspire One Netbook with Eclipse running on the Windows partition.

    Now I want to try Android Studio on the Ubuntu Linux partition.

    Here are the steps involved.

  • Download Android Studio.
  • Place in Home directory for easy access.
  • Get OpenJDK.
  • Set the JAVA_HOME environment variable:
  • In a terminal window switch to root with "sudo su". Then type: "export JAVA_HOME=usr/lib/jvm/java-openjdk-i386.

    Navigate to the directory android-studio/bin and type "./studio.sh"

    Tuesday, January 28, 2014

    Windows Vista Ransomware Removal

    Repaired a Toshiba Satellite that was blocked by ransomware.

    Symptoms:
     
  • ConfigFree error message display.
  •  
  • A white screen, submit button and text box blocked out the desktop

  • Resolution:
     
  • Restart, hold F8 key, select safe mode with command prompt
  •  
  • Immediately type "explorer" and then hit Enter.
  •  
  • Type "rstrui.exe" and then hit Enter.
  •  
  • Click Start and search for "Backup and restore".
  •  
  • Select and install an earlier restore point
  •  
  • Once finished, connect to internet and browse to Bleeping Computer.
  •  
  • Search for favorite malware cleaners, e.g. ADW, MalwareBytes, CCleaner.
  • The best solution would be wiping the drive and installing Linux.

    Monday, January 27, 2014

    Saturday, January 25, 2014

    Saturday, January 18, 2014

    My Android Crash Dump from Google Play.

    What do you all make of this? The device was a nuclear-pfdq88c.

    ----- pid 5085 at 2013-12-01 11:05:36 -----
    Cmd line: org.warmixare
    DALVIK THREADS:
    (mutexes: tll=0 tsl=0 tscl=0 ghl=0)
    "main" prio=5 tid=1 SUSPENDED

    | group="main" sCount=1 dsCount=0 obj=0x409fe460 self=0x99e7f0 | sysTid=5085 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=1075086472 | schedstat=( 33150025 66414548 106 ) utm=1 stm=2 core=0 at java.lang.String.(String.java:~271) at java.util.zip.ZipEntry.(ZipEntry.java:382) at java.util.zip.ZipFile.readCentralDir(ZipFile.java:365) at java.util.zip.ZipFile.(ZipFile.java:132) at java.util.zip.ZipFile.(ZipFile.java:103) at dalvik.system.DexPathList.makeDexElements(DexPathList.java:217) at dalvik.system.DexPathList.(DexPathList.java:96) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:52) at dalvik.system.PathClassLoader.(PathClassLoader.java:65) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:57) at android.app.LoadedApk.getClassLoader(LoadedApk.java:302) at android.app.LoadedApk.makeApplication(LoadedApk.java:474) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3938) at android.app.ActivityThread.access$1300(ActivityThread.java:123) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) "Binder Thread #2" prio=5 tid=10 NATIVE | group="main" sCount=1 dsCount=0 obj=0x40f9f648 self=0xbb1cb8 | sysTid=5097 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=11358712 | schedstat=( 2132541 3323875 7 ) utm=0 stm=0 core=0 at dalvik.system.NativeStart.run(Native Method) "Binder Thread #1" prio=5 tid=9 NATIVE | group="main" sCount=1 dsCount=0 obj=0x40f9f390 self=0xbbbb08 | sysTid=5096 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=11944632 | schedstat=( 2403456 7518911 6 ) utm=0 stm=0 core=0 at dalvik.system.NativeStart.run(Native Method) "FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT | group="main" sCount=1 dsCount=0 obj=0x40f9ac30 self=0xb9dac0 | sysTid=5095 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=11736064 | schedstat=( 250832 6191288 4 ) utm=0 stm=0 core=0 at java.lang.VMThread.sleep(Native Method) at java.lang.Thread.sleep(Thread.java:1031) at java.lang.Thread.sleep(Thread.java:1013) at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213) at java.lang.Thread.run(Thread.java:856) "FinalizerDaemon" daemon prio=5 tid=7 WAIT | group="main" sCount=1 dsCount=0 obj=0x40f9aad8 self=0xb68540 | sysTid=5094 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=11962768 | schedstat=( 175043 457957 5 ) utm=0 stm=0 core=0 at java.lang.Object.wait(Native Method) - waiting on <0x409f45d0> (a java.lang.ref.ReferenceQueue) at java.lang.Object.wait(Object.java:401) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73) at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168) at java.lang.Thread.run(Thread.java:856) "ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT | group="main" sCount=1 dsCount=0 obj=0x40f9a970 self=0xb3e0a8 | sysTid=5093 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=12180016 | schedstat=( 223209 495083 5 ) utm=0 stm=0 core=0 at java.lang.Object.wait(Native Method) - waiting on <0x409f44f8> at java.lang.Object.wait(Object.java:364) at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128) at java.lang.Thread.run(Thread.java:856) "Compiler" daemon prio=5 tid=5 SUSPENDED | group="system" sCount=1 dsCount=0 obj=0x40f9a880 self=0xb9d5e0 | sysTid=5092 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=11987072 | schedstat=( 6524739 29390328 13 ) utm=0 stm=0 core=0 at dalvik.system.NativeStart.run(Native Method) "JDWP" daemon prio=5 tid=4 VMWAIT | group="system" sCount=1 dsCount=0 obj=0x40f9a798 self=0xb61750 | sysTid=5091 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=11987008 | schedstat=( 436750 1113875 8 ) utm=0 stm=0 core=0 at dalvik.system.NativeStart.run(Native Method) "Signal Catcher" daemon prio=5 tid=3 RUNNABLE | group="system" sCount=0 dsCount=0 obj=0x40f9a6a0 self=0xb5da58 | sysTid=5090 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=11481440 | schedstat=( 17497159 33581478 46 ) utm=1 stm=0 core=0 at dalvik.system.NativeStart.run(Native Method) "GC" daemon prio=5 tid=2 VMWAIT | group="system" sCount=1 dsCount=0 obj=0x40f9a5c0 self=0xbbef20 | sysTid=5088 nice=0 sched=0/0 cgrp=[no-cpu-subsys] handle=11810104 | schedstat=( 509375 5738453 3 ) utm=0 stm=0 core=0 at dalvik.system.NativeStart.run(Native Method) ----- end 5085 -----

    Thursday, January 9, 2014

    Friday, January 3, 2014

    More Kit Kat on a Samsung Galaxy Tablet P3113

    This is a follow up to the previous post.

  • I noticed no Developer Options under settings. Bummer.
  • The absence or corruption of the Cyanogenmod development.apk meant no USB debugging for a connection to the Android SDK on my Aspire One netbook.

    Solution: I found an app that mimics the Developer Tools at https://play.google.com/store/apps/details?id=org.westhill.development&feature=also_installed.

    All this prompted me to recompile the following Augmented Reality social networking app with a target of 19 a.k.a. Kit Kat.

  • https://play.google.com/store/apps/details?id=org.warmixare
  • Jan 15 2013 Revision : I found that tapping the [Build Number] under [Settings | About Device] enables [Developer Options]. Tap the [Build Number] 7 times.