File dir = new File(Environment.getExternalStorageDirectory() + "/directory");
if(dir.exists() && dir.isDirectory()) {
// do something here
}
Archive for the ‘Android’ Category
Gartner, a market research firm, has forecasted that Android will grab nearly 50% of smartphone market. Google’s Android Base phones have reportedly increased the market share of the smartphones in 2011. Samsung and HTC have clocked higher sales with Android platform that improved their compatibility and dominate the smartphone market.
According to Gartner, there were over 296 million smartphones shipped last year out of which Android secured a 22.7% share. The smartphone shipments worldwide is expected to reach 468 million units, which will help Android to grab 38.5% market share by the end of the year, followed by Apple’s iOS at 19.4%, and Symbian at 19.2% . In 2012, more than 630 million smartphones will be shipped and Android will secure 49.2% share of the market, displacing iOS, with 18.9% share. BlackBerry OS will own 12.6% share of the smartphone market, nabbing the third place. Pushing the forecast further to 2015, a whopping 1.1 billion smartphones will be shipped out of which Android will snare 48.8% market share followed by Microsoft’s Windows Phone with 19.5% and iOS at 17.2%.
Gartner expects that Android will cut the prices of smartphones considerably that by 2015, 67% of all open OS devices will have an average selling price of $300 or below
Gartner also predicted that Android’s tablet is projected to grab 38.6% of the market by 2015 with a projected 113.5 million units sold.
Here I am showing only adding the footer view. create a footer_layout.xml for your footer. my_list is the ListView
View footerView = getLayoutInflater().inflate(R.layout.footer_layout, my_list, false); lister1.addFooterView(footerView);
VideoView vd = (VideoView)findViewById(R.id.videoview);
Uri uri = Uri.parse("android.resource://package/"+R.raw.movie);
MediaController mc = new MediaController(this);
vd.setMediaController(mc);
vd.setVideoURI(uri);
vd.start();
StatFs stat_fs = new StatFs(Environment.getExternalStorageDirectory().getPath());
double avail_sd_space = (double)stat_fs.getAvailableBlocks() *(double)stat_fs.getBlockSize();
double GB_Available = (avail_sd_space / 1073741824);
System.out.println("Available GB : " + GB_Available);
C:\android\tools>emulator -avd VD2.0 -sdcard mySdCardFile.img
Now go to Eclipse Open DDMS on the right top of the window and open the File-Explorer from the Window-Menu
There you will see the SDcard
C:\android\tools>mksdcard -l mySdCard 1024M mySdCardFile.img
A file image named “mySdCardFile” will be created with about 1024 MB memory or you can give it in KB also.
Now SDCard created.Check your C:\android\tools directory and confirm that the image has been created.
File folder = new File(Environment.getExternalStorageDirectory() + "/dir");
boolean success = false;
if(!folder.exists())
{
success = folder.mkdir();
}
if (!success)
{
// Do something on success
}
else
{
// Do something else on failure
}
AudioManager audMangr;
audMangr= (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE);
//For Normal mode
audMangr.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
//For Silent mode
audMangr.setRingerMode(AudioManager.RINGER_MODE_SILENT);
//For Vibrate mode
audMangr.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
Android Utilities that help in the design and development of Android application user interfaces. This library currently consists of three individual tools for designers and developers,
- UI Prototyping Stencils
- Android Asset Studio
- Android Icon Templates
UI Prototyping Stencils:
The Pencil is a free and opensource tool for making diagrams and GUI prototyping that everyone can use. It is a simple Firefox Addon.
here is the home page link…
http://pencil.evolus.vn/en-US/Home.aspx
Installs on Firefox 3.5 or later. While Firefox 4.0 is not yet supported.
Android Asset Studio:
A set of online tools and controls that help in creating icons and assets. It provides several controls to adjust the appearance of icons. These generators allow you to quickly and easily generate icons from existing source images, clipart, or text. Currently available asset generators are available for:
- Launcher icons
- Menu icons
- Tab icons
- Notification icons
See Android Asset Studio in action.

Only Google Chrome is supported for now…
Currently only Chrome 6+ is recommended and supported. Your mileage may vary with other browsers.
Android Icon Templates
Android Icon Templates Pack is a collection of template designs, textures, and layer styles that make it easier for you to create icons that conform to the guidelines.
Here are the Template packs for different android versions,
Android Icon Templates Pack, v2.3 »
Android Icon Templates Pack, v2.0 »
Android Icon Templates Pack, v1.0 »
Always follow Icon Design Guidelines here,
http://developer.android.com/guide/practices/ui_guidelines/icon_design.html









