Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Monday, 27 May 2013

How to read a folder structure in the assets folder in Android?

    AssetManager mngr_spinner = getAssets();
 try {
           int img_count = 0;
           folder_array = mngr_spinner.list(parent_folder_name);
    labels_array = new String[folder_array.length];
           for (int i = 0; i < folder_array.length; i++) 
        {
    // System.out.println("Folder " + folder_array[i]);
    if ((folder_array[i].endsWith(".png") || folder_array[i].endsWith(".jpg"))) 
         {
           img_count++;
         }
        }
      } catch (IOException e1) 
                  {
     e1.printStackTrace();
    }
Note : The folder will not be read if it has no contents in it.

Sunday, 26 May 2013

Samsung Galaxy S4


Samsung Galaxy S4

Samsung Galaxy S4

Display
5inch Full HD Super AMOLED (1920 x 1080) display, 441 ppi


AP
1.9 GHz Quad-Core Processor / 1.6 GHz Octa-Core Processor
The seletion of AP will be differed by markets
Network
2.5G (GSM/ GPRS/ EDGE): 850 / 900 / 1800 / 1900 MHz
3G (HSPA+ 42Mbps): 850 / 900 / 1900 / 2100 MHz
4G (LTE Cat 3 100/50Mbps) : up to 6 different band sets (Dependent on market)
OS
Android 4.2.2 (Jelly bean)

Memory
16 / 32 / 64GB memory + microSD slot (up to 64GB), 2GB RAM
Camera
Main(Rear): 13 Mega pixel Auto Focus camera with Flash & Zero Shutter Lag, BIS
Sub (Front): 2 Mega pixel camera, Full HD recording @30fps with Zero Shutter Lag, BIS

Camera Features
Dual Shot , Drama Shot, Sound & Shot, 360 Photo, Animated Photo, Eraser, Night, Best Photo, Best Face, Beauty Face, HDR (High Dynamic Range), Panorama, Sports


Video
Codec: MPEG4, H.264, H.263, DivX, DivX3.11, VC-1, VP8, WMV7/8, Sorenson Spark, HEVC
Recording & Playback: Full HD (1080p)
Audio
Codec: MP3, AMR-NB/WB, AAC/AAC+/eAAC+, WMA, OGG,
FLAC, AC-3, apt-X
Additional Features
Group Play: Share Music, Share Picture, Share Document,
Play Games
Story Album, S Translator, Optical Reader
Samsung Smart Scroll, Samsung Smart Pause, Air Gesture,
Air View
Samsung Hub, ChatON (Voice/Video Call, Share screen,
3-way calling) Samsung WatchON
S Travel (Trip Advisor), S Voice™ Drive, S Health
Samsung Adapt Display, Samsung Adapt Sound, Auto adjust touch sensitivity (Glove friendly)
Safety Assistance, Samsung Link, Screen Mirroring
Samsung KNOX (B2B only)
Google Mobile Services
Google Search, Google Maps, Gmail, Google Latitude Google Play Store, Google Plus, YouTube, Google Talk, Google Places, Google Navigation, Google Downloads, Voice Search
Sensor
Accelerometer, RGB light, Geomagnetic, Proximity, Gyro,
Barometer
Temperature & Humidity, Gesture
Dimension
136.6 x 69.8 x 7.9 mm, 130g

Connectivity
WiFi 802.11 a/b/g/n/ac (HT80)
GPS / GLONASS
NFC, Bluetooth® 4.0 (LE)
IR LED (Remote Control), MHL 2.0
Battery
2,600mAh

Monday, 5 November 2012

ActionBar with Search Option and other options in Android.


This is the example showing how to start with ActionBar in android.

1. <a href="http://www.coderzheaven.com/2012/01/28/android-removes-the-need-of-menu-button-from-devices-with-actionbar/" title="ActionBar" target="_blank">Android removes the need of Menu button from devices with ActionBar.</a>

2. <a href="http://www.coderzheaven.com/2012/08/23/start-actionbar-android/" title="ActionBar" target="_blank">How to start with ActionBar in Android?</a>

3. <a href="http://www.coderzheaven.com/2012/09/28/dynamically-adding-removing-toggling-removing-actionbar-tabs-android-part-2/" title="ActionBar" target="_blank">Dynamically Adding, Removing, Toggling and Removing all ActionBar Tabs in Android – Part 2?</a>
 

Read complete post from here..

http://www.coderzheaven.com/2012/10/20/actionbar-search-option-options-android/

Saturday, 21 July 2012

How to initialize an ArrayList in Android?


ArrayList<String> images_arr =
new ArrayList<String>(){
private static final long serialVersionUID = -1773393753338094625L;
{
add("string1");
add("string2");
add("string3");
add("string4");
}
};

Tuesday, 19 June 2012

How to explicitly free memory in android OR Release unwanted memory in Android?


public void freeMemory(){
    System.runFinalization();
    Runtime.getRuntime().gc();
    System.gc();
}

Visit http://www.coderzheaven.com/2012/04/24/explicitly-free-memory-android-release-unwanted-memory-android/ for more information.

Wednesday, 13 June 2012

Android hits 900k activations per day


The Google Android Army is coming again...

Google’s Android platform sees 900,000 activations a day, according to a tweet from Android head Andy Rubin. The statistic, of course, doesn’t distinguish between smartphones and tablets, so it’s hard to get a clear picture of the Android ecosystem.

<img src="http://coderzheaven.com/uploads/images/Google-Android-army.jpg" alt="Google Android" />


See more about this new from here.

http://www.washingtonpost.com/business/technology/android-hits-900k-activations-per-day/2012/06/11/gJQA1tlfUV_story.html

Sunday, 10 June 2012

CoderzHeaven on Facebook, New Fan Page


Please find us on Facebook for more updates.


This is our new Fab page Url.

http://www.facebook.com/CoderzHeavenFans

By adding us on Facebook, you can get access to our new updates fast and get answers to your questions quickly.

So please add us on Facebook.


Please find us on Twitter also..

https://twitter.com/coderzheaven


Monday, 4 June 2012

How to read a text file in ANDROID?


Hi all…..


In this post I will show you how to read a text file in ANDOID.
Let your file is in the assets folder of your ANDOID project.
The file is named “myfile.txt”


This example reads the file line by line using readLine() function till the end of the file. Here your need two classes named “InputStreamReader” and “BufferedReader”. For writing into the file you need “OutputStreamReader” class. The result is displayed in a Toast. Make sure you notice it.

Read more from here...

http://www.coderzheaven.com/2012/04/22/how-to-read-a-text-file-in-android-2/

Sunday, 27 May 2012

Crop an Image in ANDROID.

Cropping an image in <a href="http://www.coderzheaven.com/android/" target="_blank">ANDROID</a> programmatically has always been a problem for ANDROID developers.
So Here I am putting a sample code to demonstrate this.
For cropping an <a href="http://www.coderzheaven.com/?p=1397" target="_blank">image in ANDROID</a> we need a source bitmap which is our image itself, the other one is the target <a href="http://www.coderzheaven.com/?p=3911" target="_blank">bitmap</a> which we have to
set the size as we want and a matrix.

Read the complete post from here..

http://www.coderzheaven.com/2011/03/15/crop-an-image-in-android/

Monday, 14 May 2012

Samsung Galaxy S III India launch in June first week


Samsung is expected to launch its all new Galaxy S III smartphone in India in the first week of June. According to NDTV Gadgets, India is in the first list of countries to get smartphone, which will see the launch starting May 29.

The smartphone will be priced at INR 38,000, while the street price is likely to be in the vicinity of INR 34,000.

Saturday, 12 May 2012

How to build a custom progressBar in android- Part 2?


Hello all.......

Today I am going to show you how to create a custom progressbar in android.
Previously in another posts I have already shown <a href="http://www.coderzheaven.com/?p=2689" target="_blank">how to build a custom indeterminate progressbar in android.</a>
And in this post I will show you how to customize the horizontal progressbar.

See the complete post here....
http://www.coderzheaven.com/2012/05/12/build-custom-progressbar-android-part-2/

Custom Indeterminate progressBar for android?


Hello everyone...

Today we will see how to customize an indeterminate progressBar in android.
<strong>For that we have to create an xml with a progress animation.For this I used these three images</strong>

Continue from here.....
http://www.coderzheaven.com/2012/03/29/custom-indeterminate-progressbar-for-android/


Sunday, 11 March 2012

How to save a textFile to SDCARD in android?

Here is yet another simple example showing creating and saving a text file in android to SDCARD in android.

Here is a link to the source code.

Saving TextFile to SDCARD in android?



Upload Multiple files in one request in android?

Often in our application we need to upload audio or video files to a server. Sometimes it should be done in one request. This can be done in android in a simple way.

This example helps you do this. 
How to Upload Multiple files in one request along with other string parameters in android?

Saturday, 10 March 2012

SQLiteManager plugin for eclipse






When you are working on an Android application that stores data in a SQLite database.There arise many questions like where does this database file get stored on the filesystem ? How can we access the database? i will give solution to all these problems. 
I created the database from my previous post about Using SQLite in ANDROID

 This link provides the Plugin for eclipse for viewing the database.

Working with SQLite databases through command Line in android.

Here is a simple example that shows how to work with SQLite databases through command Line in android.


Work with SQLite databases through command Line in android.

Friday, 9 March 2012

How to upload files to a server in android?

Hello everyone..
      
         Many times we need to upload image files to a server in our applications. There may be many examples that provide these examples. But here is a simple and working example of how to implement this.


This example shows how to do this...
Follow this link for the complete source code..
Uploading audio, video or image files from Android to server



Please leave your comments if you found this link and post useful.

Thursday, 8 March 2012

Expandable List in Android- A simple and effective example

Expandable List is a very useful widget in android. It helps developers a UI that has a lot of information hidden in the same window itself.
Here is a link where you can find a simple explanation of the expandable list with a fully working sample code.

Expandable ListView in ANDROID using SimpleExpandableListAdapter, a simple example.