• Use_MVC_Pattern_To_Create_Very_Basic_Shopping_Cart__-_Android_Example

    Use MVC Pattern To Create Very Basic Shopping Cart  - Android Example  Use MVC Pattern To Create Very Basic Shopping Cart - Android Example

    In this example showing use of MVC Pattern to create a very basic Shopping cart. Creating very basic Controller Class and defined in application context and you can use this Controller Class as a Global class. If any View(Activity) required values then view should call controller and then controller will call appropriate Model and provide value to view.

    Models can also communicate with each others to exchange values.

     

     

    Read More
  • Download_Images_From_Web_And_Lazy_Load_In_ListView_-_Android_Example

    Download Images From Web And Lazy Load In ListView - Android Example  Download Images From Web And Lazy Load In ListView - Android Example

    In this example downloading images from web to a listview. Using lazy loading to download images in a listview. Using custom adapter to create lisview rows and using ImageLoader class to lazy load images from web and show in listview row. Click on listview showing image url in alert.

     

    Steps :

        MainActivity.java : Initialize static image url in string array and create listview.
        LazyImageLoadAdapter.java : Used to create each list row. Inflate tabitem.xml file for each row and call ImageLoader.java to download image from url and resize downloaded image cache on sdcard.
        ImageLoader.java : Used to download image from url and resize downloaded image and make file cache on sdcard. Lazy load images for listview rows.
        FileCache.java : Used to create folder at sdcard and create map to store downloaded image information.
        MemoryCache.java : Used to set cache folder size limit ( How much mb/kb downloaded image cache folder will store ) and also used to clear cache files from sdcard.
        Utils.java : Used to Create Cache image for images downloaded from web.

     

    Read More
  • Accelerometer_Basic_Example_-_Detect_Phone_Shake_Motion

    Accelerometer Basic Example - Detect Phone Shake Motion  Accelerometer Basic Example - Detect Phone Shake Motion

    In this example detecting Accelerometer Motion, when Accelerometer force value cross thersold showing an alert for motion detected.

     

    Use :

       1. You can use this example in games based on Accelerometer Motion (Phone Tilt).
       2. You can use this example for battary consumption when using GPS Calls. Combine Screen Wake Sleep Example with this example to consume less battary when calling GPS calls.Later We will give combined example to consume less battery.

     

    NOTE :

     Check this example in real device.

     

    Read More