Sunday, August 2, 2015

Android Development Tools: Which Packages to Install


As a minimum when setting up the Android SDK, you should download the latest tools and Android platform:
  1. Open the Tools directory and select:
    • Android SDK Tools
    • Android SDK Platform-tools
    • Android SDK Build-tools (highest version)
  2. Open the first Android X.X folder (the latest version) and select:
    • SDK Platform
    • A system image for the emulator, such as
      ARM EABI v7a System Image

The Android Support Library provides an extended set of APIs that are compatible with most versions of Android.
Open the Extras directory and select:
  • Android Support Repository
  • Android Support Library

To develop with Google APIs, you need the Google Play services package:
Open the Extras directory and select:
  • Google Repository
  • Google Play services
Note: Google Play services APIs are not available on all Android-powered devices, but are available on all devices with Google Play Store. To use these APIs in the Android emulator, you must also install the the Google APIs system image from the latest Android X.X directory in the SDK Manager.


Source: http://developer.android.com/sdk/installing/adding-packages.html

Saturday, July 18, 2015

How to use id.pool.ntp.org in Windows 7/8/8.1/10

Open your regedit.exe, and edit this values
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\DateTime\Servers
1 REG_SZ 0.id.pool.ntp.org
2 REG_SZ 1.id.pool.ntp.org
3 REG_SZ 2.id.pool.ntp.org
4 REG_SZ 3.id.pool.ntp.org

http://www.pool.ntp.org/zone/id

Wednesday, July 8, 2015

Installing Amazon SDK (old)

This is what I have done to install Amazon SDK in Android SDK Manager.
  1. Android SDK Manager -> Tools -> Manage Add-on Sites -> User Defined Sites -> New (or Edit if you already has one.)
  2. Enter URL https://s3.amazonaws.com/android-sdk-manager/redist/addon.xml
  3. Amazon device (optional)
    • Amazon Fire Phone addon in Android 4.2.2 Level 17
    • Amazon Fire Tablet add on in Android 4.4.2 level 19
  4. Extra (optional)
    • Amazon Kindle Fire USB Driver
    • Phone Build Tools: If you are developing for Fire Phone

Play Video (mp4,3gp,etc) From Resource (old)

  1. put your mp4 file into folder res/raw (you need to create folder raw under folder res)
    For example d:\workspace\Test\res\raw
    Application Name: Test
    mp4 file name: gayatrimantra.mp4
    full path filename: d:\workspace\Test\res\raw\gayatrimantra.mp4
  2. to start your Video, write this code
        public void ClickDeh(View view)
        {
            VideoView videoview = (VideoView) findViewById(R.id.videoView1);
          
            Uri uri = Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.gayatrimantra);
                  
            videoview.setVideoURI(uri);
            videoview.start();      
        }

Note: File name must be unique
Source: http://www.androidsnippets.com/play-video-file-from-resources

Samsung I5700/Spica/Portal (old)

Samsung released its latest Android operating system for I5700/Spica/Portal i.e Android 2.1 Update 1, and has no more plan to support this device for higher operating system. I'll show you how to update from operating system Android version 1.x to official operating system Android 2.1 Update 1.
For preparation, you need to download & install New PC Studio 2.0 or latest.
To make your software connecting to your device, you to change your device setting, here is what you should change:
1. If your device is on version 1.5 (cupcake):
Go to Main Menu >> Settings >> About Phone >> Additional Settings. 
Make sure "Mass storage only" is unchecked. Make it unchecked if it is not.
2. If your device is on version 2.1 (eclair):
Go to... Main Menu >> Settings >> Applications >> Development.
Make sure "USB debugging" is checked. Make it checked if it is not.
Follow these following steps:
  1. remove your SIM Card & Micro SD-CARD from your device
  2. connect your mobile to PC using USB
  3. click update firmware, it will download your firmware (2.1) into your phone
  4. follow instruction.
  5. after firmware installation finish, your may shutdown your device
  6. reinsert your SIM/Micro SDCARD
  7. start your device normally
Note: You need to full charged on your mobile before proceed this procedure