Wednesday, October 1, 2014

In 10 steps, you can run almost all Android applications on your Google Chrome browser!!!

Nobody has imagined that lovely Android applications can run on a PC or Mac, but on June 2014 Google announced that they are going to update the Chrome OS so that it can run APK files natively. On Sept. 2014, the first Android apps were available for Chrome OS.

Here is how you can try this yourself:

  1. You must have your chrome browser updated to the latest version 35+.
  2. Download ARChon Custom Runtime 32 or 64 from here, and extract to your hard disk.
  3. Open chrome://extensions/ and check on Developer mode in the upper right corner.
  4. Now click Load unpacked extension button and browse for ARChon folder then press OK, you should see a new extension is added like this "ARChon Custom Runtime 1.1 - x86_64 38.4410.120.25".
  5. Download Chrome APK packager from here, it is not available on play store because Google removed it earlier.
  6. Install Chrome APK packager on your phone, and run it.
  7. Follow the following instructions to export an Android application as a Chrome extension (zipped archive).

    Choose how would you like to share the generated zip archive in order to transfer to your PC.
  8. Extract the generated zip archive on your hard disk, as done in step 2.
  9. Add the extracted extension to Chrome, as done in step 4.
  10. The Android application should appear now in your Chrome apps and run smoothly, enjoy!!
For an updated list of working applications, please refer to this document.

References:

  1. chrome-apk-packager
  2. Archon
  3. All tested APKs
  4. Useful article 1
  5. Useful article 2
  6. Useful article 3

Monday, March 31, 2014

How to install JOGL1.1 into Netbeans?

  1. Download JOGL1.1 "windows amd64 and i586" zip file from here or here.
  2. Extract this zip file to C:\ so you should have C:\JOGLwin\lib32 and C:\JOGLwin\lib64
  3. Open Netbeans and create a new project, call it "Computer Graphics" for example.
  4. Download the file "SimpleJoglApp.java" or from here and add it to your project.
  5. Right-click the project and choose properties.
  6. Select Run from the left, then add this Java VM option: "-Djava.library.path=C:\JOGLwin\lib64", and press Ok.
  7. After this, right-click on Libraries and select "Add Library", or simply choose "Libraries" from project properties on the left.  
  8. Press Add Library -> Create -> Type the library name "Jogl" and press Ok.
  9. Now, click "Add JAR/Folder", browse to "C:\JOGLwin\lib32", and select all files then press "Add JAR/Folder", then do the same for "C:\JOGLwin\lib64".
  10. After adding both sets of JARs, your library should look like this:
  11. Click OK -> OK, run your project/file and it should work.
  12. Download the book from here or here.

ِAndroid/IOS Mobile Applications: How do I add URI support to my app?



Part 1: Define the URI structure

First step is to figure out how the URI will look. At minimum, it will look something like this:

com.myshoppingsite://

In URI lingo "shopping" is considered the scheme and is whatever you'd like it to be. So first choose an appropriate scheme. Typically, it will follow something very similar to your app name.

Next is to consider the path after the scheme. In the com.myshoppingsite:// example say if you want to link to a specific product within your app, you can do something like:

com.myshoppingsite://products/123

Here are some more examples of URI schemes that are out there:
http://wiki.akosma.com/IPhone_UR...
http://handleopenurl.com/

Here is a good answer that illustrates how best to go about defining the URI structure:

https://www.quora.com/URIs/What-best-practices-should-I-follow-when-creating-URI-structures-for-mobile-apps/answer/Simon-Tam-5


Part 2: Integrate the scheme into your app

Without getting too technical, here's the quick and dirty version. Please refer here for more a more detailed view:

https://www.sparq.it/web/api/v1/...

IOS devices

1. Define the URI scheme in Info.plist under CFBundleURLTypes -> CFBundleURLSchemes.

2. Implement application:openURL:sourceApplication:annotation: in your app delegate. (handleOpenUrl is deprecated)

3. The full URI will be passed in which you can then parse and handle within your app

Full reference: http://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW50

Android devices

First determine which set of activities will be handling your URIs. For example, say your app can display products and you want your URI to deeplink into them like so:

com.myshoppingsite://products

You will then need to define an intent filter in the AndroidManifest.xml:
Full reference: http://developer.android.com/training/basics/intents/filters.html#AddIntentFilter