<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7269812144653400123</id><updated>2011-12-10T11:38:05.173+08:00</updated><category term='Mobile Graphics'/><category term='J2ME'/><category term='Graphics Designing for Mobiles'/><category term='dotMobi'/><category term='protocol'/><category term='Flash on Android'/><category term='JavaME/J2ME'/><category term='MVC'/><category term='OAuth'/><category term='DeviceAnywhere'/><category term='TelephonyManager'/><category term='Illustration for Mobile designing'/><category term='tablet'/><category term='Development Framework'/><category term='Cisco'/><category term='J2ME Security Architecture'/><category term='LWUIT'/><category term='tel URI'/><category term='AVD'/><category term='Cius'/><category term='Cius vs iPad'/><category term='Froyo'/><category term='Donut'/><category term='Google Dev Fest'/><category term='SetUp'/><category term='IMEI'/><category term='Blackberry'/><category term='Ashna'/><category term='Perfectomobile'/><category term='Chrome'/><category term='LWUIT UI Components'/><category term='Siemens'/><category term='LG'/><category term='Bookmark'/><category term='Sony Ericsson'/><category term='Android'/><category term='Unit Testing'/><category term='Design Patterns'/><category term='J2MEUnit'/><category term='TestCase'/><category term='J2ME Polish'/><category term='HTML5'/><category term='MIDP'/><category term='Android Development Tool'/><category term='Android 2.0'/><category term='Finding myself'/><category term='S60'/><category term='CSS Validation'/><category term='Ashna Technologies'/><category term='mobiReady'/><category term='JMUnit'/><category term='cloud computing'/><category term='Nokia'/><category term='Difference between J2MEUnit and JMUnit'/><category term='FoneMonkey'/><category term='J2ME UI Library'/><category term='Content Provider Content Resolver'/><category term='platformRequest()'/><category term='TearDown'/><category term='J2ME Polish Architecture'/><category term='TestSuite'/><category term='Motorola'/><category term='Lightweight User Interface Toolkit'/><category term='TELEPHONY_SERVICE'/><category term='Social APIs'/><category term='Symbian'/><category term='S40'/><category term='Innovation in Designing'/><category term='UISpec'/><category term='Mobile Application Testing'/><category term='#devfest'/><category term='MIDlet Signing'/><category term='Android 2.2'/><category term='App Inventor'/><category term='Mobile Application Version Upgrade using MIDP2.0 and MIDP 1.0'/><category term='Android 1.6 SDK'/><category term='iPhone'/><category term='IMSI'/><category term='MSISDN'/><category term='Motorola CLIQ'/><category term='Device fragmentation'/><category term='Java Verified'/><category term='System.getProperty()'/><category term='polish.css'/><category term='device.xml'/><category term='Samsung'/><category term='Motoblur'/><category term='Sandbox'/><category term='Buzz'/><category term='enterprise social software'/><category term='Optimization'/><category term='Block a Call'/><title type='text'>Ashna</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-4767681989359782415</id><published>2011-12-09T14:19:00.001+08:00</published><updated>2011-12-10T11:38:05.199+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Content Provider Content Resolver'/><category scheme='http://www.blogger.com/atom/ns#' term='Bookmark'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Open webpage using Android app and mark URL as Bookmark</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Few of fellow developer friends drop me a query about an app which open a browser with predefined URL &amp;amp; mark that URL as bookmark. The solution is as follows:-&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;To open a browser with in a app, you have to create a browser Intent.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;/span&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void browseURL(String url) {&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Intent browseIntent = new Intent(Intent.ACTION_VIEW);&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; browseIntent.setData(Uri.parse(url));&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startActivity(browseIntent);&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Now before saving this URL as a bookmark, you need to check whether it's already exist or not. So to read bookmarks we need to access Android's Browser content provider using ContentResolver object. You can then use the ContentResolver's methods to interact with whatever content providers you're interested in.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;&lt;i&gt;private boolean isBookmarked() {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boolean isBookemarked = false; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String[] projection = new String[] {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Browser.BookmarkColumns.TITLE,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Browser.BookmarkColumns.URL&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cursor mCur = managedQuery(Browser.BOOKMARKS_URI, projection, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Browser.BookmarkColumns.URL + " like '" + &amp;nbsp; m_url + "' AND " + Browser.BookmarkColumns.BOOKMARK + " = 1", null, null);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mCur.moveToFirst();&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;int titleIdx = mCur.getColumnIndex(Browser.BookmarkColumns.TITLE);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;int urlIdx = mCur.getColumnIndex(Browser.BookmarkColumns.URL);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String bTitle = "";&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String bUrl = "";&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (mCur.isAfterLast() == false) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bTitle = mCur.getString(titleIdx);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bUrl = mCur.getString(urlIdx);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mCur.moveToNext();&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mCur.close();&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;        &lt;/span&gt;if(bTitle.equalsIgnoreCase(m_title) &amp;amp;&amp;amp; bUrl.equalsIgnoreCase(m_url)) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isBookemarked = true;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return isBookemarked; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;The above method will query the Browser.BookmarkColumns table which containing both bookmarks and history items. To read this table requires the READ_HISTORY_BOOKMARKS permission and writing to it requires the WRITE_HISTORY_BOOKMARKS permission. Now if url is not marked in bookmarks then you need to save the url in bookmark.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;i&gt;private void saveBookmark(String title, String url) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final ContentValues bookmarkValues = new ContentValues();&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bookmarkValues.put(Browser.BookmarkColumns.TITLE, title);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bookmarkValues.put(Browser.BookmarkColumns.URL, url);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bookmarkValues.put(Browser.BookmarkColumns.BOOKMARK, 1);&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final Uri newBookmark = getContentResolver().insert(Browser.BOOKMARKS_URI, bookmarkValues); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;ContentValues class is used to store a set of values that the ContentResolver can process. To verify you can check the browser bookmarks for new entry.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-4767681989359782415?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/4767681989359782415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2011/12/open-webpage-using-android-app-and-mark.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/4767681989359782415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/4767681989359782415'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2011/12/open-webpage-using-android-app-and-mark.html' title='Open webpage using Android app and mark URL as Bookmark'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-3680009325019142067</id><published>2011-07-20T01:16:00.001+08:00</published><updated>2011-07-20T01:26:48.065+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sandbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Verified'/><category scheme='http://www.blogger.com/atom/ns#' term='J2ME'/><category scheme='http://www.blogger.com/atom/ns#' term='MIDlet Signing'/><category scheme='http://www.blogger.com/atom/ns#' term='J2ME Security Architecture'/><title type='text'>MIDlet Signing</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;J2ME Security Architecture&lt;/b&gt; is driven from &lt;b&gt;Java Sandbox Architecture&lt;/b&gt;. J2ME represents two level of securities:-&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Low Level KVM Security&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Application Level Security&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;Low Level KVM Security&lt;/b&gt; is divided into two steps:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;Pre-verification&lt;/b&gt; performs certain checks on the Java bytecodes using preverify&amp;nbsp;tool, if first level of verification is passed, then preverifier add special stack map attributes into class files to facilitate runtime in-device verification.&amp;nbsp;Note that preverified class files with the special attribute are approximately 5% larger than the original files.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;In-device verification&lt;/b&gt; is performed on real device by KVM. It refers to the additional information attached to the pre-verified files &amp;amp; verify whether the class file is structurally or conceptually&amp;nbsp;correct according to J2ME specifications.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;As you know small devices are memory constraints, so split verifier improves verification process by generating annotations at compile time and then using this information at runtime. The runtime verification is therefore faster &amp;amp; use less memory.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The Low Level KVM Security is very limited &amp;amp; used to verify that the given set of Java classes in a MIDlet are valid classes and nothing more. Actual security threats are come into picture at this level such as accessing device file system, network connectivity etc. For normal Java, we have different&amp;nbsp;&lt;/span&gt;mechanism to over come Security threats, but these are memory consuming and not suitable for handheld devices.&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;So &lt;b&gt;Application Level Security&lt;/b&gt; is an&amp;nbsp;&lt;/span&gt;optimized variant of Java Sandbox Security Model, which means:-&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Java class files are pre-verified and should be valid Java classes.&lt;/li&gt;&lt;li&gt;Only a limited, predefined set of APIs are available to the developer.&lt;/li&gt;&lt;li&gt;Downloading and management of MIDlet is performed by Application Manager (part of KVM).&lt;/li&gt;&lt;li&gt;No User-defined class loaders.&lt;/li&gt;&lt;li&gt;No support for Reflection.&lt;/li&gt;&lt;li&gt;No Thread groups or daemon threads.&lt;/li&gt;&lt;/ul&gt;Till now, we discuss the security architecture of J2ME; Now we'll discuss about MIDlet Signing Process. Most of you J2ME developer knows that while we access any&amp;nbsp;restricted or limited set of APIs (JSR 75, Network Access etc), MIDlet will prompt a security alert to get the user confirmation. To avoid these kind of security alerts MIDlet Signing comes into picture.&amp;nbsp;You can sign your MIDlet using three approaches and listed as follows:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Vendor Specific Signing&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Operator Specific Signing&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Java Verified Signing&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-XxS1gkkAyks/TiW1dstnkII/AAAAAAAAA6U/cgq95_NBD7E/s1600/MIDlet-Signing.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-XxS1gkkAyks/TiW1dstnkII/AAAAAAAAA6U/cgq95_NBD7E/s320/MIDlet-Signing.png" width="250" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;MIDlet Signing Process&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;First we’ll discuss about &lt;b&gt;Java Verified Signing&lt;/b&gt;, It’s a third party MIDlet Signing which cost 200 USD per year for one publisher ID, under this publisher ID you can submit ‘n’ number of applications. For Java verified testing, you can choose lead device as well as sub devices too. If you choose lead device then your application will be also supported on sub devices, according to the Java Verified documentation. For each vendor(Nokia, Sony Ericsson, Samsung, etc) they have different set of lead devices. You can also choose sub devices for signing according to the application's requirements for specific API support on sub device. For third party signing, prompts will still appear but with additional options: &lt;i&gt;“Always Allowed” or “Allow for this session”&lt;/i&gt;. According to user selection MIDlet will changes it’s behavior. The main point to be consider here is device should have UTI root certificate, if it’s not present in device then MIDlet installation will fail.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Operator Specific Signing -&amp;nbsp;&lt;/b&gt;If MIDlet is accessing any of the operator specific services like GPRS etc, then user will receive a prompt. To avoid those prompt this signing is very useful &amp;amp; also operator can verify that the MIDlet is authorize to access it’s services. It is mostly used in US &amp;amp; Europe continent by some of the operators.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Vendor Specific Signing&lt;/b&gt; – It comes under manufacturer domain signing and this signing will help you to remove all prompts from the application. For this signing, you need to contact each of the vendor &amp;amp; after that they will test your app on predefined test scenarios for MIDlet signing.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-3680009325019142067?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/3680009325019142067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2011/07/midlet-signing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/3680009325019142067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/3680009325019142067'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2011/07/midlet-signing.html' title='MIDlet Signing'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-XxS1gkkAyks/TiW1dstnkII/AAAAAAAAA6U/cgq95_NBD7E/s72-c/MIDlet-Signing.png' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Kuala Lumpur, Federal Territory of Kuala Lumpur, Malaysia</georss:featurename><georss:point>3.139003 101.68685499999992</georss:point><georss:box>3.032754 101.61520149999993 3.2452520000000002 101.75850849999992</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-4695401726531519337</id><published>2010-11-07T22:56:00.001+08:00</published><updated>2010-11-07T22:57:23.531+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='App Inventor'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Google - App Inventor for Android</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi Readers,&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Last Saturday 30th OCT 2010, I got the opportunity to attend the meet up for Google's App Inventor by the&amp;nbsp;&lt;a href="http://www.codeandroid.my/"&gt;Code Android Malaysia Group&lt;/a&gt;. The meetup is great, learned new stuff &amp;amp; explore few Android devices (WITS A81E, Haipad G10, Zenithink ZT-180 ePad, Dell Streak, Samsung Galaxy S, HTC Dream/G1, &amp;amp; Nexus One).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://appinventor.googlelabs.com/about/"&gt;App Inventor&lt;/a&gt; -&amp;nbsp;&lt;/b&gt;App Inventor is a web based tool from Google that makes it easy for anyone (programmer &amp;amp; non-programmer) to create mobile applications for Android-powered devices.&amp;nbsp;It provides us visual blocks which help us to create mobile applications by drag-and-drop functionality. Some of the few features of App-Inventor are listed as below:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;No syntax&lt;/b&gt;&amp;nbsp;: No need to remember the coding syntax of programming languages.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Visual Blocks&lt;/b&gt;&amp;nbsp;: The components and functions are organized into blocks. Need to find relevant block &amp;amp; used that function by drag-&amp;amp;-drop feature.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Functionality based on Events&lt;/b&gt;&amp;nbsp;: "When this event happens, the application does this" is the correct conceptual model. Support this feature with event listeners!&lt;/li&gt;&lt;li&gt;&lt;b&gt;Support &amp;amp; Simplicity&lt;/b&gt; : App Inventor supports a great library of visual components with simplicity of use by end user to develop mobile applications.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;To use App Inventor, you do not need to be a developer. This is because instead of writing code, you visually design the way the app looks and use blocks to specify the app's behavior.&amp;nbsp;App Inventor is simple to use, but also very powerful. It provide the functionality to store data, use GPS-Location &amp;amp; Accelerometer Sensor and many more features. To storing data in application it use TinyDB &amp;amp; stored data will be available each time the app runs. TinyDB is a non-visible component.&amp;nbsp;The blocks editor uses the &lt;a href="http://dspace.mit.edu/handle/1721.1/41550"&gt;Open Blocks Java library&lt;/a&gt; for creating visual blocks programming languages.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Android App Inventor&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;object height="295" style="background-image: url(http://i1.ytimg.com/vi/8ADwPLSFeY8/hqdefault.jpg);" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/8ADwPLSFeY8?fs=1&amp;amp;hl=en_US"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/8ADwPLSFeY8?fs=1&amp;amp;hl=en_US" width="480" height="295" allowscriptaccess="never" allowfullscreen="true" wmode="transparent" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Few facts about App Inventor:-&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;For multiple screen application App Inventor have each .apk file; you need to invoke relevant file on the calling event of multiple screen application.&lt;/li&gt;&lt;li&gt;App Inventor is not integrated with Android Market yet.&lt;/li&gt;&lt;li&gt;App Inventor does not generate the Java source code to export to Eclipse or any other IDE.&lt;/li&gt;&lt;li&gt;You can integrate the App Inventor with your real device and also with Android SDK.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;Android App Inventor Tutorial:-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;You can find basic &amp;amp; advanced tutorial for App Inventor over &lt;a href="http://appinventor.googlelabs.com/learn/tutorials/index.html"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-4695401726531519337?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/4695401726531519337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/11/google-app-inventor-for-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/4695401726531519337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/4695401726531519337'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/11/google-app-inventor-for-android.html' title='Google - App Inventor for Android'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-138259199554275455</id><published>2010-10-03T05:40:00.000+08:00</published><updated>2010-10-03T05:40:33.877+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TelephonyManager'/><category scheme='http://www.blogger.com/atom/ns#' term='IMSI'/><category scheme='http://www.blogger.com/atom/ns#' term='MSISDN'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='TELEPHONY_SERVICE'/><category scheme='http://www.blogger.com/atom/ns#' term='IMEI'/><title type='text'>How to get IMEI on Android Devices?</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi Readers,&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;As per your queries about IMEI on Android devices; I am posting this article, please do let me know with your feedback and further queries. The solution is as follows:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;Device, network, SIM &amp;amp; data state related info on Android platform is managed by TelephonyManager. Your application can use the methods defined in this class to determine the desired information. Please note, you cannot instantiate this class directly; instead you need to retrieve a reference to an instance like this:-&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;String serviceName = Context.TELEPHONY_SERVICE;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;TelephonyManager m_telephonyManager = (TelephonyManager) getSystemService(serviceName);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;To access some telephony information you need to set appropriate permission in your application manifest file, because few informations are permission protected. In our case we need to set permission for our app:-&lt;br /&gt;&lt;br /&gt;Now let's start with actual source code to retrieve the information:-&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;public String findDeviceID() {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;String deviceID = null;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;String serviceName = Context.TELEPHONY_SERVICE;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;TelephonyManager m_telephonyManager = (TelephonyManager) getSystemService(serviceName);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;int deviceType = m_telephonyManager.getPhoneType();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;switch (deviceType) {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;case (TelephonyManager.PHONE_TYPE_GSM):&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;break;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;nbsp;          &lt;/span&gt;case (TelephonyManager.PHONE_TYPE_CDMA):&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;nbsp;          &lt;/span&gt;break;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;nbsp;          &lt;/span&gt;case (TelephonyManager.PHONE_TYPE_NONE):&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;nbsp;          &lt;/span&gt;break;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;default:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;break;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;deviceID = m_telephonyManager.getDeviceId();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;return deviceID;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;The above method will return you the IMEI in-case&amp;nbsp;of GSM and&amp;nbsp;MEID or ESN for CDMA devices. When you can run this code on real device the output will be like this:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_QPx57D_lFa8/TKehLosEXiI/AAAAAAAAAuA/zBpc-8a4078/s1600/DeviceID.png" imageanchor="1"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/_QPx57D_lFa8/TKehLosEXiI/AAAAAAAAAuA/zBpc-8a4078/s320/DeviceID.png" width="213" /&gt;&lt;iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=ashna&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1430232226&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;Point to be noted here is &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;i&gt;deviceType&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt; that we are getting using TelephonyManager Class. This code will work on Android 1.6 and above because CDMA stack is implemented on Android 1.6 and above. So If you are using Android 1.5 devices just remove CDMA related code from it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Using TelephonyManager you can&amp;nbsp;retrieve much more information about device. For example:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Retreive MSISDN:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;String msisdn = &amp;nbsp;m_telephonyManager.getLine1Number();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-style: normal;"&gt;Retreive SIM Serial Number:-&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;String simSerialNumber =&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;m_telephonyManager.getSimSerialNumber();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-style: normal;"&gt;Retreive IMSI:-&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;String imsi =&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;m_telephonyManager.getSubscriberId();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;For more info please visit &lt;/span&gt;&lt;a href="http://developer.android.com/reference/android/telephony/TelephonyManager.html"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;TelephonyManager&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-138259199554275455?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/138259199554275455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/10/how-to-get-imei-on-android-devices.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/138259199554275455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/138259199554275455'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/10/how-to-get-imei-on-android-devices.html' title='How to get IMEI on Android Devices?'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_QPx57D_lFa8/TKehLosEXiI/AAAAAAAAAuA/zBpc-8a4078/s72-c/DeviceID.png' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-5713882576071006620</id><published>2010-09-09T01:42:00.002+08:00</published><updated>2010-09-09T01:47:49.969+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dotMobi'/><category scheme='http://www.blogger.com/atom/ns#' term='mobiReady'/><category scheme='http://www.blogger.com/atom/ns#' term='Mobile Application Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Perfectomobile'/><category scheme='http://www.blogger.com/atom/ns#' term='FoneMonkey'/><category scheme='http://www.blogger.com/atom/ns#' term='UISpec'/><category scheme='http://www.blogger.com/atom/ns#' term='DeviceAnywhere'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS Validation'/><title type='text'>Mobile Application Testing</title><content type='html'>&lt;div class="MsoNormal" style="text-align: justify;"&gt;&lt;b&gt;Types of &lt;st1:place w:st="on"&gt;Mobile&lt;/st1:place&gt; Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;ol start="1" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list .5in; text-align: justify;"&gt;&lt;b&gt;WAP Application&lt;/b&gt; – These applications are      browser based applications &amp;amp; end user can access these applications      using WAP/Mobile browser. These applications cannot work in offline mode      (Without GPRS connectivity). For example:-&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style="mso-list: l1 level2 lfo1; tab-stops: list 1.0in; text-align: justify;"&gt;m.google.com&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l1 level2 lfo1; tab-stops: list 1.0in; text-align: justify;"&gt;m.youtube.com&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l1 level2 lfo1; tab-stops: list 1.0in; text-align: justify;"&gt;cnnmobile.com&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style="mso-list: l1 level1 lfo1; tab-stops: list .5in; text-align: justify;"&gt;&lt;b&gt;Installable Applications&lt;/b&gt; – These applications      are installable applications and end user can install these applications      on their handset and these applications have ability to work in offline      mode (Without GPRS connectivity). For Example:-&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style="mso-list: l1 level2 lfo1; tab-stops: list 1.0in; text-align: justify;"&gt;Twitter App&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l1 level2 lfo1; tab-stops: list 1.0in; text-align: justify;"&gt;Yahoo Go!&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l1 level2 lfo1; tab-stops: list 1.0in; text-align: justify;"&gt;Messenger Apps&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;&lt;b&gt;Testing of &lt;st1:place w:st="on"&gt;Mobile&lt;/st1:place&gt; Applications:-&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;We can test mobile applications by using SDKs, Testing Tools and on the real devices. To test Mobile Applications we have various tools available and listed as below:&lt;/div&gt;&lt;ol start="1" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://ready.mobi/launch.jsp?locale=en_EN"&gt;http://ready.mobi/launch.jsp?locale=en_EN&lt;/a&gt;      - is tests mobile-readiness using industry best practices &amp;amp; standards.      After testing you receive a free report outlining how well your site      performs.&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://jigsaw.w3.org/css-validator/"&gt;http://jigsaw.w3.org/css-validator/&lt;/a&gt;      - CSS Validation Tool&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://mtld.mobi/emulator.php"&gt;dotMobi      Emulator&lt;/a&gt; – A tool which emulates a real mobile phone Web browser. It’s      a bit limited as you can only choose from two different phones you like as      a skin.&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://validator.w3.org/mobile/"&gt;http://validator.w3.org/mobile/&lt;/a&gt;      - Performs various test on a web page for mobile-friendliness.&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;span style="color: blue;"&gt;Firefox For &lt;st1:place w:st="on"&gt;Mobile&lt;/st1:place&gt; Testing&lt;/span&gt; - Firefox is powered with few add-on      using which we can test mobile Web site. To make Firefox imitate a mobile      device you need:&lt;/li&gt;&lt;ol start="1" style="margin-top: 0in;" type="a"&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;The Firefox Web browser&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;The Modify Headers add-on&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;The User Agent Switcher add-on&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;A UA Profile HTTP Header&lt;/li&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://www.testiphone.com/"&gt;http://www.testiphone.com/&lt;/a&gt;      - This is a web browser based simulator for quickly testing your iPhone      web applications. This tool has been so far tested and working using      Internet Explorer 7, FireFox 2 and Safari 3.&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://www.genuitec.com/mobile/"&gt;http://www.genuitec.com/mobile/&lt;/a&gt;      - MobiOne iPhone/PalmPre SDK Emulator for Windows. Provide various      functionality test on Mobile WAP sites like memory management etc.&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;span style="color: blue;"&gt;Vendor Specific      Emulators/SDKs&lt;/span&gt; – We can also find vendor specific SDKs and      Emulators for mobile application testing. We can download these SDKs from      below mention links:-&lt;/li&gt;&lt;ol start="1" style="margin-top: 0in;" type="a"&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://developer.android.com/sdk/index.html"&gt;Android Emulator&lt;iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=ashna&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1608452530&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://developer.apple.com/iphone/index.action"&gt;iPhone Simulator&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://na.blackberry.com/eng/developers/"&gt;BlackBerry       simulators&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://www.forum.nokia.com/Library/Tools_and_downloads/"&gt;Nokia       Emulators&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://innovator.samsungmobile.com/"&gt;Samsung       Emulators&lt;/a&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://developer.motorola.com/docstools/"&gt;Motorola       Emulators&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://developer.sonyericsson.com/wportal/devworld/downloads?cc=gb&amp;amp;lc=en"&gt;SonyEricsson       Emulators&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://developer.lgmobile.com/lge.mdn.tnd.RetrieveDocAndTools.dev?objectType=T"&gt;LG       Emulators&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/windowsmobile/default.aspx"&gt;Windows       Mobile Emulators&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://developer.palm.com/"&gt;Palm Emulator&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://www.nttdocomo.co.jp/english/service/imode/make/content/browser/html/"&gt;i-mode       HTML Simulator&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level2 lfo2; tab-stops: list 1.0in; text-align: justify;"&gt;&lt;a href="http://www.opera.com/developer/tools/"&gt;Opera       Mobile Emulator&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://www.deviceanywhere.com/"&gt;DeviceAnywhere&lt;/a&gt;      - DeviceAnywhere is a great platform for mobile application testing. It      provides us a feature using which we can test mobile application on real      device from remote location on any remote network/operator. DeviceAnywhere      is trusted and widely accepted testing tool for mobile application. It      also provide us automation testing tool for mobile applications. The APIs      are build using Java and end user can use for different vendor devices.      They have some predefined automation testing scripts and end user can also      build their own automation test scripts. During test you can also used      device basic feature make a call, receive a call, SMS etc. Nokia, Samsung,      SonyEricsson also provide RDA (Remote Device Access) facility in      collaboration with DeviceAnywhere. Using DeviceAnywhere we can test our      apps on the upcoming handsets in advance, because most of the vendors open      access to their upcoming handset using DeviceAnywhere.&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://www.perfectomobile.com/"&gt;Perfectomobile&lt;/a&gt;      - It’s a similar platform like DeviceAnywhere, but new to market. It also      provides same feature as DeviceAnywhere. For more info please visit – &lt;a href="http://www.perfectomobile.com/portal/cms/Products/knowledgecenter.html"&gt;Knowledge      Center&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://code.google.com/p/uispec/"&gt;UISpec&lt;/a&gt;      - UISpec is a Behavior Driven Development framework for the iPhone that provides      a full automated testing solution that drives the actual iPhone UI. It      provides us a library that we can use on the MAC OS – Xcode. It’s a      opensource project by Google and mostly used to test the UI behavior of an      iPhone App.&lt;/li&gt;&lt;li class="MsoNormal" style="mso-list: l0 level1 lfo2; tab-stops: list .5in; text-align: justify;"&gt;&lt;a href="http://www.gorillalogic.com/fonemonkey"&gt;FoneMonkey&lt;/a&gt;      – FoneMonkey is a functional testing tool for the iPhone providing for the      interactive creation, editing and playback of automation scripts that      exercise an application's user interface. Using FoneMonkey, you can create      suites of tests that automate performing user operation sequences and      verifying results. FoneMonkey is designed to support developer as well as      QA testing, and FoneMonkey tests can be easily incorporated into      continuous integration environments.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-5713882576071006620?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/5713882576071006620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/09/mobile-application-testing.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/5713882576071006620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/5713882576071006620'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/09/mobile-application-testing.html' title='Mobile Application Testing'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-5256134113829841967</id><published>2010-07-17T19:02:00.000+08:00</published><updated>2010-07-17T19:02:33.277+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sandbox'/><category scheme='http://www.blogger.com/atom/ns#' term='MIDP'/><category scheme='http://www.blogger.com/atom/ns#' term='Blackberry'/><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='Block a Call'/><category scheme='http://www.blogger.com/atom/ns#' term='Symbian'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='S60'/><category scheme='http://www.blogger.com/atom/ns#' term='S40'/><title type='text'>Block a Call</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi Readers,&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Again while working on my blog, I found that some one of you are looking for an article on "Block a Call". But I am not clear about the stuff that you are looking for using J2ME or for some other technologies. No issues, I'll try to explain about it.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AFAIK, You can not block a call or SMSs using J2ME APIs. Because MIDlet can only execute within "Sandbox". Now if you are trying to support this kind of functionality in your application, then you need to know about the market segment and the device penetration ratio in that market. So that you can build your app using different technologies. Let me give you more brief idea about it using an example:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Suppose we are targeting XYZ market and the device penetration ratio is as following for that market segment:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;ul&gt;&lt;li&gt;Nokia S60 &amp;amp; other Symbian &amp;nbsp;devices - 45%&lt;/li&gt;&lt;li&gt;Nokia S40 &amp;nbsp;&amp;amp; other Java devices - 30%&lt;/li&gt;&lt;li&gt;Android, iPhone, Blackberry &amp;nbsp;&amp;amp; other devices - 25%&lt;/li&gt;&lt;/ul&gt;So now, you can target first 45% devices using the native Symbian app. For Android, iPhone we have APIs which provide the support to block a call with in the application. So you can also target these devices with native apps. Where as on Blackberry I am not sure about the APIs, which JDE version support the call blocking. You may dig into the Blackberry forums and may have a look on it.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Now the rest segment is MIDP devices, as you all know that we don't have any APIs to support call block functionality. But I can guide you with one workaround, may be it'll provide some help to you. To make a call block on MIDP devices, first you need to fetch the number from your contact list by making use of "TextField.PHONENUMBER" constraint and fetch the MSISDN and send it cross with some keyword like BLOCK on the specific number for your teleco client. Then on the server side you can do all the manipulation to block the MSISDN.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I hope I answered your question. If you still have some queries please let me know, I'll try to explain as per my knowledge on mobile application segments.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-5256134113829841967?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/5256134113829841967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/07/block-call.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/5256134113829841967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/5256134113829841967'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/07/block-call.html' title='Block a Call'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-5485498916162122424</id><published>2010-07-17T06:47:00.002+08:00</published><updated>2010-07-17T13:27:09.240+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Social APIs'/><category scheme='http://www.blogger.com/atom/ns#' term='OAuth'/><category scheme='http://www.blogger.com/atom/ns#' term='#devfest'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Dev Fest'/><category scheme='http://www.blogger.com/atom/ns#' term='Chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='Buzz'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud computing'/><title type='text'>Google Dev Fest @ KL</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi Readers,&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Today I went to &lt;a href="http://code.google.com/events/devfests/2010/asia3.html"&gt;&lt;b&gt;Google's Dev Fest @ KL&lt;/b&gt;&lt;/a&gt;, almost 400+ Google APIs fans were there. I hope everyone had great time @ &lt;a href="http://www.tpm.com.my/"&gt;&lt;b&gt;Technology Park Malaysia&lt;/b&gt;&lt;/a&gt;, &amp;amp; really it was a great event.&amp;nbsp;I learned a lot and hopefully I'll try to provide you some insight about Google's Dev Fest. So let's start:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Google Dev Fest started with&amp;nbsp;an introduction on what the DevFest day would cover by&amp;nbsp;Christine Songco, Program Manager for Developer Relations @ Google &amp;amp; by&amp;nbsp;Nazrul Kamaruddin, Community Manager at GTUG Kuala Lumpur.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;After this, Daniels Lee a Googler who supports developers with Google MAPS Javascript API V3 ran through several code snippets &amp;amp; describe the various&amp;nbsp;features list of V3, such as:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style="text-align: justify;"&gt;Map Controls (Default UI, Position Custom Controls, etc.)&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Overlays (Markers, Icon, Polylines, Ploygons, Custom Overlays, etc.)&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Map Events (MVC properties with event handlers, UI events, etc.)&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Map Services (Directions,&amp;nbsp;Elevation,&amp;nbsp;Geocoding,&amp;nbsp;Street View, etc).&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;For more references you can have a look on these links, listed as below:-&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li style="text-align: justify;"&gt;&lt;a href="http://code.google.com/apis/maps/documentation/javascript/basics.html"&gt;&lt;b&gt;Google MAPs Javascript API V3&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;a href="http://code.google.com/apis/maps/documentation/javascript/articles.html"&gt;&lt;b&gt;Good Articles&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Note:&lt;/b&gt;&amp;nbsp;MAP API V3.0 doesn't require API developer key, &amp;amp; also Beta released for Places APIs but require API developer key to use in different WEB, WAP &amp;amp; Mobile apps. Daniels Lee also showcase one app that is developed using Google MAPs Javascript API V3. You can find app @ &lt;a href="http://whereiscoffee.appspot.com/"&gt;&lt;b&gt;Where is Coffee?&lt;/b&gt;&lt;/a&gt;&amp;nbsp;&amp;amp; source code for same app is available @ &lt;b&gt;&lt;a href="http://goo.gl/2aZ8"&gt;Coffee Source Code&lt;/a&gt;.&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Presentation Links&lt;/b&gt;:-&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li style="text-align: justify;"&gt;&lt;a href="http://goo.gl/4o7S"&gt;&lt;b&gt;Google MAP V3.0 Presentation&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;a href="http://goo.gl/xwfr"&gt;&lt;b&gt;Best Viewed in Google Chrome&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This is all about first session of Google's MAP API V3.0 @ Google Dev Fest, KL. After this we had a presentation on HTML5 by&amp;nbsp;Patrick Chanezon a cool Googler. He explained HTML5 quite&amp;nbsp;impressible way, though during his presentation WiFi was not good. Few of the best points of HTML5 are listed as follow:-&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li style="text-align: justify;"&gt;HTML5 (HTML + CSS + JS APIs)&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Web Storage&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Web SQL Database&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Web Sockets&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Canvas&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Audio&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Video&lt;/li&gt;&lt;li style="text-align: justify;"&gt;New form field types&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Canvas 3D (WebGL)&lt;/li&gt;&lt;li style="text-align: justify;"&gt;SVG in HTML5&lt;/li&gt;&lt;li style="text-align: justify;"&gt;New Font Support in CSS&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Instant Web 2.0 Logo Creatr &amp;amp; many many more..&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;For all the HTML stuff please visit the presentation @ &lt;b&gt;&lt;a href="http://goo.gl/wpHN"&gt;HTML5 Presentation&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;. Some of the useful resources for HTML5 is as follows:-&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://www.html5rocks.com/tutorials/"&gt;HTML5 Tutorial&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://www.html5rocks.com/resources.html"&gt;References&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://diveintohtml5.org/"&gt;Dive into HTML5&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://people.mozilla.com/~prouget/demos/"&gt;HTML5 Demos&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://goo.gl/x3by"&gt;HTML5 Drum Kit&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://www.effectgames.com/effect/"&gt;Effect Games&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;(Based on HTML5)&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://goo.gl/Jrv8"&gt;SVG Editor HTML5 based tool&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;You can also provide support for HTML5 on IE 6, 7 or 8 by using &lt;b&gt;&lt;a href="http://code.google.com/chrome/chromeframe/"&gt;Google Chrome Frame&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;. You can also have a look on &lt;/span&gt;&lt;a href="http://goo.gl/L5lI"&gt;Chrome Frame&amp;nbsp;Developer Guide&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;After this we moved&amp;nbsp;towards&amp;nbsp;the Open Social APIs, the session was taken by Tim &amp;amp; Bob. Team of two funky Buzz Googlers, who did so many funky stuff on stage to energies the audience after lunch especially to mention cartwheel by both Googlers on stage. This session is mainly based on Open Standards and Buzz APIs. &amp;nbsp;Buzz APIs really have good stuff and has loads of stuff built in. Essential components of a Google Buzz post are - the Identity, the Activity &amp;amp; the Object. Open standards are really cool and Google Buzz are using all of them in Buzz such as &lt;/span&gt;&lt;a href="http://oauth.net/"&gt;OAuth&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;, &lt;/span&gt;&lt;a href="http://goo.gl/Wm66"&gt;RESTful&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; calling style to access JSON data structures, &lt;/span&gt;&lt;a href="http://code.google.com/p/oacurl/"&gt;oacurl&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;etc. Even I am new to these APIs. So I suggest to have a look on the documentation. To know more about Buzz please visit the &lt;/span&gt;&lt;a href="http://code.google.com/apis/buzz/docs/"&gt;Buzz Docs&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;. You can also have a look on few links listed as below:-&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://code.google.com/apis/buzz/docs/libraries.html"&gt;Buzz Libraries &amp;amp; Sample Applications&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.boxee.tv/"&gt;Boxee&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;(Fully utilize Google Buzz)&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://buzz-bingo.appspot.com/"&gt;Buzz Bingo&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;You can have a look on the Googler's Presentation @&amp;nbsp;&lt;b&gt;&lt;a href="http://www.scribd.com/doc/34404374/DevFest-Kuala-Lumpur-The-Google-Buzz-API-And-You"&gt;The Google Buzz API And You&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After this healthy &amp;amp; interactive session,&amp;nbsp;Patrick Chanezon is again on the stage with a session on Cloud Computing. He shared Google's presence in the cloud computing space &amp;amp; also shared the fact that&amp;nbsp;2 million companies use google apps to increase company revenues. Now I/O Chrome Webstore is renamed as Google Apps Marketplace &amp;amp; shares 20%&amp;nbsp;&amp;nbsp;of Google revenue. &lt;b&gt;&lt;a href="http://www.socialwok.com/"&gt;Socialwok&lt;/a&gt;&lt;/b&gt; is an example of a enterprise apps on&amp;nbsp;Google Apps Marketplace&amp;nbsp;- based @ Singapore.&amp;nbsp;Patrick Chanezon also suggest more people should use Google App Engine to serve static content.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Updates:- &lt;a href="http://goo.gl/QLTT"&gt;Cloud Computing Presentation&lt;/a&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hey readers even I am also not much more into Cloud Computing stuff so not have more content to share with you guys. I just shared with you small stuff, but you can Google it and find the more relevant stuff on Cloud Computing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In addition to this, few developers &amp;amp; companies showcased their products. Few of them are listed as below:-&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Chrome Extension for Google Dev Fest:&lt;/b&gt;&amp;nbsp;Leonard Lee showcased the Chrome extension developed by him &amp;amp; totally based on HTML5, CSS, JS &amp;amp; JSON. You can install it from here - &amp;nbsp;&lt;b&gt;&lt;a href="http://goo.gl/my7j"&gt;Google Dev Fest Chrome Extension&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;&amp;amp; information about Google Chrome Extension is here - &lt;/span&gt;&lt;a href="http://goo.gl/SRQN"&gt;Tutorial&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.teratotech.com/"&gt;Terato Tech&lt;/a&gt;:&lt;/b&gt;&amp;nbsp;Terato Tech rocked the Google Dev Fest with their mobile app - "Undies: What are you wearing today?" This app is based on social networking &amp;amp; made a good use of Google MAP APIs for mobile applications.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I hope that I covered almost every section of the Google Dev Fest @ KL. If I forgot something or If you think that some information is not correct or not properly shared, so I&amp;nbsp;apologies for that. You&amp;nbsp;may correct me and &amp;nbsp;also let me know with your inputs and experiences @ Google Dev Fest.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-5485498916162122424?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/5485498916162122424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/07/google-dev-fest-kl.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/5485498916162122424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/5485498916162122424'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/07/google-dev-fest-kl.html' title='Google Dev Fest @ KL'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-6941779426795420767</id><published>2010-07-14T23:15:00.000+08:00</published><updated>2010-07-14T23:15:05.764+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tel URI'/><category scheme='http://www.blogger.com/atom/ns#' term='J2ME'/><category scheme='http://www.blogger.com/atom/ns#' term='protocol'/><category scheme='http://www.blogger.com/atom/ns#' term='platformRequest()'/><title type='text'>How to make a call in J2ME?</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi Readers,&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Today while working on my blog, I came to know that someone of you are searching for article on "How to make a call in J2ME?". So this article is especially for that user. In this article, I describe you about how to use your phone book &amp;amp; make a call on that number, also you can directly enter any&amp;nbsp;international format number&amp;nbsp;and make a call. So let's start:-&lt;br /&gt;&lt;br /&gt;Here I'll show you two things - 1) Fetch contacts from your device&amp;nbsp;phonebook, &amp;amp; 2) Make a Call&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1) Fetch Contacts from your device phonebook:&lt;/b&gt;&lt;br /&gt;We can do this activity in two ways - a) By using JSR 75 API, &amp;amp; b) By using TextField property constraint.&lt;br /&gt;&lt;br /&gt;First method is bit complex and it require signing of application from device vendor, to avoid security prompt while accessing the device phonebook. So we'll skip this method and directly switch to second option. In this you need to use one of the textfield constraint "PHONEBOOK" to access the whole contact list using J2ME app. The code is as follows:-&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;TextField numberTxtField = new TextField("Please enter the number:", numberString, 12, TextField.PHONENUMBER);&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;When you use this code in your app, then on real device when the focus is on "&lt;i&gt;numberTxtField&lt;/i&gt;" you will see the commands to "Search" on Nokia devices &amp;amp; "Lookup" on Sony devices. Commands may be differ from vendor to vendor but the functionality is same - to access the contact list of the device.&amp;nbsp;Using this code we are able to see the contact list from device and even also we can enter any international format number in the textfield at runtime.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2) Make a Call:&lt;/b&gt;&lt;br /&gt;Now the next step, how to make a call from J2ME application. It's very simple and you need to use platformRequest() method of MIDlet class and pass the number with "tel:" string; which make sure that method is used to make a call. To check more on the URI scheme, please visit - &lt;a href="http://en.wikipedia.org/wiki/URI_scheme"&gt;http://en.wikipedia.org/wiki/URI_scheme&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The code will look like this:-&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;private boolean makeACall() {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;boolean isCalled = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;//used to read the number from textfield&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;numberString = numberTxtField.getString();&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (numberString.indexOf("+") != -1) {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;isCalled = this.platformRequest("tel:" + numberString);&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;isCalled = this.platformRequest("tel:+" + numberString);&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pauseApp();&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;notifyPaused();&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception e) {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Nothing to do..&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (IllegalArgumentException e) {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;isCalled = false;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Handle the functionality for wrong format of number&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception ex) {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;isCalled = false;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return isCalled;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Now you need to call this function at the "Call" command using command handler interface, and if you are using low level APIs then need to handle the key events. So using this method you can handle the call functionality in your J2ME application.&amp;nbsp;The users who are looking for this&amp;nbsp;functionality can let me know with their inputs.&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-6941779426795420767?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/6941779426795420767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/07/how-to-make-call-in-j2me.html#comment-form' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/6941779426795420767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/6941779426795420767'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/07/how-to-make-call-in-j2me.html' title='How to make a call in J2ME?'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-6375671300049319627</id><published>2010-07-01T01:35:00.003+08:00</published><updated>2010-07-01T02:07:16.850+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cius vs iPad'/><category scheme='http://www.blogger.com/atom/ns#' term='enterprise social software'/><category scheme='http://www.blogger.com/atom/ns#' term='tablet'/><category scheme='http://www.blogger.com/atom/ns#' term='Cius'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Cisco's Android-Based Cius Tablet</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi Readers,&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;We all know that Android is a OS for mobile devices and we all are mostly expecting same. But on July 29, 2010 Cisco unveiled Android based seven-inch tablet PC named as &lt;b&gt;&lt;a href="http://www.cisco.com/en/US/products/ps11156/index.html"&gt;Cisco Cius&lt;/a&gt;&lt;/b&gt; and redefine the Android space. The new Cisco Cius is an “ultra-portable, mobile collaboration business tablet that offers access to essential business applications and technologies.” Cisco's Cius has great feature list which brings it to the lime light with greatest &amp;amp; serious competitor to the Apple's iPad tablet. Apple iPad is best suited for content delivery and that's what it does best &amp;amp; used for by consumers. On the other hand Cisco Cius is all about enterprise. Now you are thinking that what features make it an enterprise tablet PC.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Cisco Cius Enterprise Tablet PC&lt;/b&gt;&lt;br /&gt;Cius runs on Android and supports full integration of Cisco’s Telepresence technology with HD video conferencing support. The product and enterprise features are list for Cius Tablet PC as follows:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Product Features:-&lt;/b&gt;&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;The Cisco Cius is a lightweight portable business computing tablet offered with an optional HD audio station equipped with a telephone handset speakerphone, HD DisplayPort and USB ports.&lt;/li&gt;&lt;li&gt;The Cisco Cius tablet features a front-mounted 720p HD camera which refreshes at up to 30 frames per second; a seven inch, high-resolution widescreen super VGA touch-target display for real-time and streamed video, and single-button TelePresence interoperability that can be utilized either when the tablet is docked, or being used remotely via Wi-Fi.&lt;/li&gt;&lt;li&gt;The tablet has a 5-megapixel rear facing camera that can transmit streaming VGA quality video and capture still images, and dual noise-cancelling microphones for audio conferencing.&lt;/li&gt;&lt;li&gt;Cisco Cius features an eloquent contacts-driven user experience, designed to enable users to quickly reach their important contacts.&lt;/li&gt;&lt;li&gt;An on-board accelerometer readily orients applications for viewing in portrait or landscape modes as users rotate the device to their preferred viewing orientation.&lt;/li&gt;&lt;li&gt;Cisco Cius supports 802.11 a/b/g/n Wi-Fi for enterprise campus mobility and 3G cellular services when off-campus. 4G services will be available at a later date. Bluetooth and Micro-USB means users can work untethered and share data with a PC.&lt;/li&gt;&lt;li&gt;A detachable and serviceable battery offers eight hours of life under normal usage.&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Enterprise Features:-&lt;/b&gt; &lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;Cisco Cius provides support for the comprehensive suite of Cisco collaboration applications including &lt;b&gt;&lt;a href="http://www.cisco.com/en/US/products/ps10668/index.html"&gt;Cisco Quad&lt;/a&gt;, &lt;a href="http://www.cisco.com/web/solutions/dms/desktop_video.html"&gt;Cisco Show and Share&lt;/a&gt;, &lt;a href="http://www.cisco.com/en/US/products/ps10528/index.html"&gt;Cisco WebEx Connect&lt;/a&gt;, &lt;a href="http://www.cisco.com/en/US/products/ps10409/index.html"&gt;Cisco WebEx Meeting Center&lt;/a&gt;, &lt;a href="http://www.cisco.com/en/US/products/ps6837/index.html"&gt;Cisco Presence&lt;/a&gt;,&lt;/b&gt; and interoperability with &lt;a href="http://www.cisco.com/en/US/netsol/ns669/networking_solutions_solution_segment_home.html"&gt;&lt;b&gt;Cisco TelePresence&lt;/b&gt;&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Cisco Cius is supported by &lt;b&gt;&lt;a href="http://www.cisco.com/en/US/products/sw/voicesw/ps556/index.html"&gt;Cisco Unified Communications Manager&lt;/a&gt;&lt;/b&gt; and is easily integrated into existing Cisco customer environments.&lt;/li&gt;&lt;li&gt;Cisco Cius helps ensure a more secure mobile collaboration experience by leveraging Cisco AnyConnect VPN Security, part of the &lt;b&gt;&lt;a href="http://www.cisco.com/en/US/netsol/ns1015/index.html"&gt;Cisco Borderless Networks&lt;/a&gt;&lt;/b&gt; architecture.&lt;/li&gt;&lt;li&gt;Virtual desktop integration provides IT organizations with the ability to host software applications securely in the data center and to utilize the Cisco network to deliver those applications 'as-a-service' anytime, anywhere. Cisco Cius thereby supports data center consolidation and reduced software licensing costs.&lt;/li&gt;&lt;li&gt;Cisco Cius offers businesses the ability to take advantage of the ever-expanding ecosystem of cost-effective, third-party applications, supported by the Android operating system, while controlling user access policy.&lt;/li&gt;&lt;li&gt;Cisco will help expand Android developed applications for business by offering Cisco Collaboration Application Protocol Interfaces (API's) to developers through a Software Developer's Kit (SDK).&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Cisco's Cius vs Apple's iPad:-&lt;/b&gt; &lt;br /&gt;One key difference between the Cius and the iPad is that Apple's tablet does not have both front- and rear-facing HD cameras. Cisco's open standards-based approach (Android) for Cius is also a differentiator between the Cius &amp;amp; the iPad, also the fact that it ties into Cisco's existing collaboration assets.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt; In addition to this Cisco also unveiled another tablet for &lt;b&gt;&lt;a href="http://www.cisco.com/web/consumer/products/hem.html"&gt;Home Energy Management&lt;/a&gt;&lt;/b&gt; solution which runs on Ubuntu.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-6375671300049319627?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/6375671300049319627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/06/ciscos-android-based-cius-tablet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/6375671300049319627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/6375671300049319627'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/06/ciscos-android-based-cius-tablet.html' title='Cisco&apos;s Android-Based Cius Tablet'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-7224131791509793653</id><published>2010-05-21T04:44:00.000+08:00</published><updated>2010-05-21T04:44:46.434+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash on Android'/><category scheme='http://www.blogger.com/atom/ns#' term='Froyo'/><category scheme='http://www.blogger.com/atom/ns#' term='Android 2.2'/><title type='text'>Welcome Android 2.2 "Froyo"</title><content type='html'>&lt;div style="text-align: justify;"&gt;Google just announced &lt;a href="http://developer.android.com/sdk/android-2.2.html"&gt;Android 2.2 "Froyo"&lt;/a&gt; based on Linux Kernel 2.6.32 at &lt;a href="http://code.google.com/events/io/2010/"&gt;Google I/O Conference&lt;/a&gt; (Moscone Center, San Francisco), and the main features of this platform are listed as below:&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;&lt;b&gt;Performance &amp;amp; speed:&lt;/b&gt; The big addition is a Dalvik JIT (Just-in-Time) compiler, which brings a 2-5x speed boost to the system.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Enterprise capabilities:&lt;/b&gt; There are also 20 new enterprise features, including better Exchange integration (for example: account auto-discovery and calendar sync) and device administration APIs which allow developers to write applications that can control security features of the device such as the remote wipe, minimum password, lock-screen timeout etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Faster, more powerful browser:&lt;/b&gt; Google also demoed a new JavaScript engine in the Android browser, which is claimed as "the world's fastest web browser,". This has resulted in a 2-3X improvement in JavaScript performance vs. 2.1. It also has a Chrome browser plug-in that allows you to send directions from Maps on your desktop directly to your Android device.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Rich set of new APIs and services:&lt;/b&gt; A new data backup APIs enable apps to participate in data backup and  restore, allowing an application's last data to be restored when  installed on a new or a reset device. Android 2.2 also features a new cloud-to-device messaging which help Android application to enable mobile  alert, send to phone, and two-way push sync functionality. Now developers can declare whether their app should be installed on internal memory or an SD card. They can also let the system automatically determine the install location.&lt;/li&gt;&lt;li&gt;&lt;b&gt;USB tethering &amp;amp; WiFi hotspot:&lt;/b&gt; Android 2.2 will come with built-in tethering&amp;nbsp; and WiFi hotspot&amp;nbsp; support. That means your Android device can be turned into &lt;span class="green"&gt;a portable Wi-Fi hotspot&lt;/span&gt; that can be shared with up to 8 devices. You can also use your Android-powered phone as a 3G connection for a  Windows or Linux laptop by connecting their phone to the computer with a USB cable. The connection  is then shared between the two devices.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Additions to Android Market:&lt;/b&gt; Android Market provides Android Application Error Reports, a new bug reporting feature, giving developers access to crash and freeze reports from users. Developers will be able to access these reports via their account on the Android Market publisher website. I love this feature, It help developer to improve the Android application.&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;In addition to this, Adobe offers Flash 10.1 beta for Android 2.2 devices which has features like multi-touch and tap-to-zoom functions, the software also uses a "smart-zoom" capability to automatically size Flash content to the best width/height dimension for the device. To download the Android 2.2 SDK, please visit &lt;a href="http://developer.android.com/sdk/index.html"&gt;Android developer site.&lt;/a&gt; Before this you need to update the &lt;a href="http://developer.android.com/sdk/eclipse-adt.html"&gt;ADT (Android Development Tool)&lt;/a&gt; plug-in for Eclipse from ADT 0.9.6 to ADT 0.9.7&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;So lets start developing apps for Android 2.2 platform because some devices will get the update in the coming weeks.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Note:&lt;/b&gt; Android 3.0 platform or Gingerbread based on Linux Kernel 2.6.33 will be available in the fourth quarter of 2010 - &lt;span class="status-body"&gt;&lt;span class="status-content"&gt;&lt;span class="entry-content"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a class="tweet-url web" href="http://tinyurl.com/2cowfsn" rel="nofollow" target="_blank"&gt;http://tinyurl.com/2cowfsn&lt;/a&gt; &lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-7224131791509793653?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/7224131791509793653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/05/welcome-android-22-froyo.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/7224131791509793653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/7224131791509793653'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/05/welcome-android-22-froyo.html' title='Welcome Android 2.2 &quot;Froyo&quot;'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-8413653094878093959</id><published>2010-01-07T20:10:00.001+08:00</published><updated>2010-01-07T20:11:18.462+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Motorola'/><category scheme='http://www.blogger.com/atom/ns#' term='JavaME/J2ME'/><category scheme='http://www.blogger.com/atom/ns#' term='Samsung'/><category scheme='http://www.blogger.com/atom/ns#' term='Nokia'/><category scheme='http://www.blogger.com/atom/ns#' term='LG'/><category scheme='http://www.blogger.com/atom/ns#' term='Sony Ericsson'/><category scheme='http://www.blogger.com/atom/ns#' term='Siemens'/><category scheme='http://www.blogger.com/atom/ns#' term='System.getProperty()'/><category scheme='http://www.blogger.com/atom/ns#' term='IMEI'/><title type='text'>How to get device IMEI number using JavaME for different vendors?</title><content type='html'>&lt;div style="text-align: justify;"&gt;The &lt;b&gt;International Mobile Equipment Identity (IMEI)&lt;/b&gt; is a number unique to every GSM, WCDMA, and iDEN mobile phone, as well as some satellite phones. It is usually found printed inside the battery compartment of the phone. It can also be displayed on the screen of the phone by entering *#06# into the keypad on most phones.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;To retreive same information using JavaME is as follows:&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;As you all know that, MIDP (Mobile Information Device Profile) when combined with CLDC provides  a Java Runtime Environment and a rich set of Java APIS for cell phones. MIDP defines some System properties that are available to the midlet with&amp;nbsp; &lt;i&gt;java.lang.System.getProperty(...)&lt;/i&gt; method. As IMEI is manufacturer specifc so there are few manufacturer specific APIs using which you can retrieve this info. Here's how to get IMEI number from mobile devices of different manufacturers:&lt;br /&gt;&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;&lt;b&gt;Nokia&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;System.getProperty("phone.imei");&lt;/li&gt;&lt;li&gt;System.getProperty("com.nokia.imei");&lt;/li&gt;&lt;li&gt;System.getProperty("com.nokia.mid.imei"); //especially for S40&amp;nbsp; devices&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Note:&lt;/b&gt; &lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: small;"&gt;Requires signed MIDlet. S60 3rd edition device does not requires signing to fetch this info.On Series 40 phones this requires that your MIDlet is signed to either operator or manufacturer domain, and this is only available in Series 40 3rd Edition, FP1 devices and newer.&lt;/span&gt;   &lt;/span&gt;&lt;li&gt;&lt;b&gt;Sony Ericsson&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;System.getProperty("com.sonyericsson.imei"); &lt;b&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Samsung&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;System.getProperty("com.samsung.imei");&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Motorola&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;System.getProperty("IMEI");&lt;/li&gt;&lt;li&gt;System.getProperty("com.motorola.IMEI");&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Siemens&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;System.getProperty("com.siemens.IMEI");&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;LG&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;System.getProperty("com.lge.imei");&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;In addition to this, there are some generic information about the device that can be retrieved by using System.getProperty(propertyString) method call, where value of propertyString can be vary as per your requirement. Few of them are listed as below:-&lt;br /&gt;&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;microedition.profiles&lt;/li&gt;&lt;li&gt;microedition.configuration&lt;/li&gt;&lt;li&gt;microedition.locale&lt;/li&gt;&lt;li&gt;microedition.platform&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;For more information see &lt;a href="http://www.forum.nokia.com/info/sw.nokia.com/id/37086440-dcce-4fb4-aa3e-8d8c16d62b33/MIDP_System_Properties_v1_2_en.zip.html"&gt;MIDP System Properties&lt;/a&gt; &amp;amp; &lt;a href="http://developers.sun.com/mobility/midp/questions/properties/index.html"&gt;J2ME Defined System Properties&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-8413653094878093959?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/8413653094878093959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/01/how-to-get-device-imei-number-using.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8413653094878093959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8413653094878093959'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2010/01/how-to-get-device-imei-number-using.html' title='How to get device IMEI number using JavaME for different vendors?'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-8860669305962956534</id><published>2009-10-28T03:56:00.000+08:00</published><updated>2009-10-28T03:56:25.531+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android Development Tool'/><category scheme='http://www.blogger.com/atom/ns#' term='Android 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android 2.0 platform release</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi Readers,&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Today Google released &lt;i&gt;&lt;b&gt;&lt;a href="http://developer.android.com/sdk/android-2.0.html"&gt;Android 2.0&lt;/a&gt;&lt;/b&gt;&lt;/i&gt; platform for mobile devices, it bundled with many new features for user and developers and also there are few changes in the Android framework API. It can be deployable to Android-powered handsets by November 2009.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Android 2.0 Platform Highlights&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;Now user can&amp;nbsp;&lt;b&gt; &lt;/b&gt;add multiple accounts to device for email and contact synchronization, including Exchange accounts (Depends upon the Handset manufacturers). Combined inbox to browse email from multiple accounts in one page.&lt;/li&gt;&lt;li&gt;Developers can create sync adapters that provide two way synchronization with any backend.&lt;/li&gt;&lt;li&gt;Quick contact API provides instant support for communication with contacts. For eg. selecting the contact photo and you will get the list of all the available way of communication. This feature is also available in SMS, Email and Calendar.&lt;/li&gt;&lt;li&gt;Search functionality for all saved SMS and MMS messages and also support auto delete features for oldest messages when a defined limit is reached.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Camera API also include some new features like color effect, scene mode, flash mode, focus mode, white balance, rotation.&lt;/li&gt;&lt;li&gt;Improved virtual keyboard support which include better keyboard layout to hit the correct character and improved typing speed with featured multi touch support. Better support for dictionary which includes contact names as suggestions.&lt;/li&gt;&lt;li&gt;Better UI support for browser to provide instant search. Facilitate user to bookmark the web page with thumbnail. Also include support for HTML5 features and double tap zoom.&lt;/li&gt;&lt;li&gt;Provide additional features for end users like infinite scrolling for event's agenda, event indicates the status for each invitee and also provide support for send invitation for new guests to events.&lt;/li&gt;&lt;li&gt;Improved Media framework API for better performance and better hardware support. ASAP user put images in the media store, Thumbnail API will generate the thumbnail and also provide support for on demand retrieve.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Improved Bluetooth API (2.1), which include support for Object Push Profile (OPP) and Phone Book Access Profile (PBAP) also developer can easily turn on and off bluetooth with in the application.&lt;/li&gt;&lt;li&gt;KeyEvent has new key dispatching APIs, to help implement action-on-up and long press behavior, as well a new mechanism to cancel key presses (for virtual keys).&lt;/li&gt;&lt;li&gt; Provide good support for different screen sizes and one binary/executable can run on different screen sizes.&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;If you are the developer then you can download Android 2.0 platform as component for the Android SDK. The downloadable platform includes a fully compliant Android library and system image, as well as a set of emulator skins, sample applications, and more. The downloadable platform is fully compliant and includes no external libraries.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Adding and updating the platform is very easy. I assume that you are using Eclipse with Android 1.6 SDK which include the AVD Manager and also helps you to install new SDK components. Before updating the platform It's mandatory to update the &lt;b&gt;&lt;i&gt;&lt;a href="http://developer.android.com/sdk/eclipse-adt.html"&gt;ADT(Android Development Tool)&lt;/a&gt;&lt;/i&gt;&lt;/b&gt; plugin for Eclipse. After that you launch AVD manager (&lt;strong&gt;Window&lt;/strong&gt; &amp;gt;&lt;strong&gt;Android SDK and AVD Manager&lt;/strong&gt;) and search for available packages and download all the required platform; which include the APIs, documentation and SDK tools for particular Android platform. Now while creating the &lt;b&gt;AVD(Android Virtual Device)&lt;/b&gt; you can select the particular platform(1.1, 1.5, 1.6, &amp;amp; 2.0). That's it now you are ready to create the application for any platform.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I hope this post will give you some understanding of Android 2.0 platform. For detail information you can directly visit &lt;i&gt;&lt;b&gt;&lt;a href="http://developer.android.com/"&gt;Android Developer Site&lt;/a&gt;&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-8860669305962956534?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/8860669305962956534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/10/android-20-platform-release.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8860669305962956534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8860669305962956534'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/10/android-20-platform-release.html' title='Android 2.0 platform release'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-4900890479142311920</id><published>2009-10-17T06:04:00.003+08:00</published><updated>2009-10-17T06:11:17.981+08:00</updated><title type='text'>Happy Diwali</title><content type='html'>&lt;div style="font-family: inherit; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Hi Readers,&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Wishing you all my friends, readers and their friends and their friends...... very very very happy, prosperous and lovable DIWALI...... God Bless You All........ Enjoy :)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_QPx57D_lFa8/StjvTX4MSaI/AAAAAAAAAlc/KT1vDcqHYGE/s1600-h/deepawali+greeting.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_QPx57D_lFa8/StjvTX4MSaI/AAAAAAAAAlc/KT1vDcqHYGE/s400/deepawali+greeting.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-4900890479142311920?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/4900890479142311920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/10/happy-diwali.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/4900890479142311920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/4900890479142311920'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/10/happy-diwali.html' title='Happy Diwali'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_QPx57D_lFa8/StjvTX4MSaI/AAAAAAAAAlc/KT1vDcqHYGE/s72-c/deepawali+greeting.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-5654548848139929218</id><published>2009-10-07T03:02:00.004+08:00</published><updated>2009-10-07T13:40:12.586+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='polish.css'/><category scheme='http://www.blogger.com/atom/ns#' term='J2ME'/><category scheme='http://www.blogger.com/atom/ns#' term='Development Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='J2ME Polish Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='J2ME Polish'/><category scheme='http://www.blogger.com/atom/ns#' term='Device fragmentation'/><category scheme='http://www.blogger.com/atom/ns#' term='device.xml'/><title type='text'>J2ME Polish - Development Framework</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi Readers,&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I hope that my previous post help you some how. Please let me know if you want some more updates or article on any specific area. Today I am going to discuss about J2ME Polish Framework. What is the requirement for development frameworks? Features of J2ME Polish etc. So let's start:-&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Why we need development frameworks?&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;To answer this question I am going to share one small example that will help you to have better understanding. We'll create a small app which has login functionality. First I am going to use only Java ME classes without any framework. Let's see:-&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;We have two options two create this app, one is by using &lt;/span&gt;High Level APIs&lt;span style="font-weight: normal;"&gt; and other is &lt;/span&gt;Low Level APIs&lt;span style="font-weight: normal;"&gt;.&amp;nbsp;&lt;b&gt;High Level APIs&lt;/b&gt; have pre-defined classes defined. You need to implement the functionality and you need not to worry about coding any graphics yourself and the application looks like (at least to some degree) native application. However there is limited control of the UI and the UI will look different on different devices.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Low level API&lt;/b&gt; &lt;span style="font-weight: normal;"&gt;requires you to implement everything (how the keys work, how the different UI are drawn on the screen, etc). You have full control of the UI and the app looks the same on all devices (but usually different from the natve application on that phone).&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;We are going to use High Level APIs in this example.&amp;nbsp;The app code look like this.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;/**&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;* Called at the start of MIDlet application&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;*/&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;protected void startApp() throws MIDletStateChangeException {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;midletDisplay = Display.getDisplay(this);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ashnaForm = new Form("Ashna MIDlet");&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ashnaForm.append("Please enter your login credentials!");&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ashnaForm.append(userIDTxt);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ashnaForm.append(pwdTxt);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ashnaForm.addCommand(exitCommand);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ashnaForm.addCommand(loginCommand);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ashnaForm.setCommandListener(this);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;midletDisplay.setCurrent(ashnaForm);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;/**&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;* Called at the exit of MIDlet application&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;*/&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;protected void destroyApp(boolean unconditional) throws MIDletStateChangeException {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (! unconditional) {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new MIDletStateChangeException();&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;/**&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;* Used to handle the commands.&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;*/&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;if (command == exitCommand) {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;destroyApp(false); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} catch (MIDletStateChangeException ex) {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alert exitAlert = new Alert("Alert", "Do you really want to exit?", null, AlertType.INFO);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exitAlert.addCommand(yesCommand);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exitAlert.addCommand(noCommand);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exitAlert.setCommandListener(this);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;midletDisplay.setCurrent(exitAlert); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Now, let's see the output for this:-&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;b&gt;&lt;/b&gt;&lt;a href="http://1.bp.blogspot.com/_QPx57D_lFa8/Sssni4HEYBI/AAAAAAAAAkU/vqfMb-WAniM/s1600-h/J2ME-Output.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_QPx57D_lFa8/Sssni4HEYBI/AAAAAAAAAkU/vqfMb-WAniM/s320/J2ME-Output.PNG" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_QPx57D_lFa8/Sssnnflz-6I/AAAAAAAAAkc/Qt_C88-Lljc/s1600-h/J2ME-Output2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_QPx57D_lFa8/Sssnnflz-6I/AAAAAAAAAkc/Qt_C88-Lljc/s320/J2ME-Output2.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;You can notice that, UI for this app is not that much attractive. To make attractive UI we have so many options such as:-&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Use J2ME Low Level APIs&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Use different UI frameworks:-&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;J2ME Polish&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;LWUIT&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Mobile Distillery’s Celsius&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;I am using J2ME Polish framework in this article. So before start coding we need to understand J2ME Polish first.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;J2ME Polish:-&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;J2ME Polish combines the power of Java Mobile (J2ME) with web-designing tool CSS.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Separate the application UI designing from the application’s source code.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Develop GUI using High Level APIs like Form, List, TextField etc.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Provide additional J2ME Polish Custom Components like TabbedForm, TreeItem and soon.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Add #style directives to applications source code for connecting code with the design.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;We can design and customize application using simple CSS text files.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Configure additional GUI options in build.xml script.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;b&gt;J2ME Polish Architecture:-&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: normal;"&gt;J2ME Polish architecture based upon three main components, which are:-&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-weight: normal;"&gt;Device Database&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: normal;"&gt;Build Framework&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: normal;"&gt;Client APIs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;b&gt;Device Database&lt;/b&gt; is the foundation of J2ME Polish and defined as device.xml. It includes the detailed information for J2ME capable devices – APIs support, Screen resolution, known issues, etc. It is used by build framework and client API&lt;/span&gt; to generate the executable for particular device.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Build Framework&lt;/b&gt; automate the necessary steps and based on the Ant tool. We can easily integrate it with IDE. The main advantage is that, it's extensible.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Client API &lt;/b&gt;has support for great GUI using CSS. It provide support for advance GUI classes such as, Tabbed Form, Tree Item, FilterList etc. In addition to this, it also support animation effects such as, text and screen transition effects.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;For every device, the approach followed by J2ME Polish:-&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="http://2.bp.blogspot.com/_QPx57D_lFa8/SsuNkQ_vJrI/AAAAAAAAAkk/FzIFqqVbyWs/s1600-h/Polish-device-approach.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_QPx57D_lFa8/SsuNkQ_vJrI/AAAAAAAAAkk/FzIFqqVbyWs/s320/Polish-device-approach.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Now I am going to use same example code that I used earlier, but with few additional changes. We have to create a file with name &lt;i&gt;polish.css&lt;/i&gt; in the resource folder and need to define all the styles. After that we'll use same styles with &lt;b&gt;&lt;span style="font-weight: normal;"&gt;pre-processing statements in our code. I'll show you with example:-&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;/***Style entries in polish.css file***/&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;titleBackground {&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #5F0000;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;basicBackground {&lt;br /&gt;&amp;nbsp;&amp;nbsp; color: #9C0000;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;menuBackground {&lt;br /&gt;&amp;nbsp;&amp;nbsp; type: round-rect;&lt;br /&gt;&amp;nbsp;&amp;nbsp; color: #5f0000;&lt;br /&gt;&amp;nbsp;&amp;nbsp; border-width: 2;&lt;br /&gt;&amp;nbsp;&amp;nbsp; border-color: #5f0000;&lt;br /&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;&lt;i&gt;title {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 2;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background: titleBackground;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-style: bold;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: medium;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-face: system;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-color: #ffffff;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout: center | expand;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;menu {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; menubar-color: #5f0000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background: menuBackground;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; min-width: 100;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //#if polish.MenuBar.Position != right &amp;amp;&amp;amp; polish.MenuBar.Position != invisible&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; view-type: slide-up;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //#endif&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-style: bold;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: medium;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-face: system;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-color: rgb(255, 255, 255);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; focused-style: menu:hover;&lt;br /&gt;}&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;Here I defined few styles, but in same way you can define as per your requirement. Now we'll see how we can use these defined styles in our app and now code look like this:-&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;/**&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;* Called at the start of MIDlet application&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;*/&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;protected void startApp() throws MIDletStateChangeException {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; midletDisplay = Display.getDisplay(this);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;//#style form&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ashnaForm = new Form("Ashna");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;//#style headingLabel&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ashnaForm.append("Please enter your login credentials!");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;//#style txtField&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;ashnaForm.append(userIDTxt);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;//#style txtField&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;ashnaForm.append(pwdTxt);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;//#style loginButton&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ashnaForm.append(loginBtn);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loginBtn.setDefaultCommand(pressCommand);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loginBtn.setItemCommandListener(this);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ashnaForm.addCommand(exitCommand);&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ashnaForm.addCommand(loginCommand);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ashnaForm.setCommandListener(this);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; midletDisplay.setCurrent(ashnaForm);&lt;br /&gt;&amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;/**&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;* Used to handle the commands.&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;*/&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;if (command == exitCommand) {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;destroyApp(false); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} catch (MIDletStateChangeException ex) {&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: blue;"&gt;//#style infoAlert&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alert exitAlert = new Alert("Alert", "Do you really want to exit?", null, AlertType.INFO);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exitAlert.addCommand(yesCommand);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exitAlert.addCommand(noCommand);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exitAlert.setCommandListener(this);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;midletDisplay.setCurrent(exitAlert); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Check the text in blue color in above sample code, in this way you can use pre-defined styles in your app. Now check the output for this app.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="http://1.bp.blogspot.com/_QPx57D_lFa8/SsuSxOXXPrI/AAAAAAAAAks/nyeCG-lV2ck/s1600-h/Polish-Output.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_QPx57D_lFa8/SsuSxOXXPrI/AAAAAAAAAks/nyeCG-lV2ck/s320/Polish-Output.PNG" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_QPx57D_lFa8/SsuSy9WvCyI/AAAAAAAAAk0/MzIiBlMzpEQ/s1600-h/Polish-Output2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_QPx57D_lFa8/SsuSy9WvCyI/AAAAAAAAAk0/MzIiBlMzpEQ/s320/Polish-Output2.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;So now you can see the difference between the GUI for same app. Same GUI effect we can provide using Low Level APIs also, but over there it's time consuming and for each device we need to port our application. Using J2ME polish you need to just code once and define all the styles after that build framework help you with the device fragmentation.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I hope this article gives you some understanding about J2ME Polish framework. If you have any queries, Please let me know. I'll try my best to answer your queries.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-5654548848139929218?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/5654548848139929218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/10/j2me-polish-development-framework.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/5654548848139929218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/5654548848139929218'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/10/j2me-polish-development-framework.html' title='J2ME Polish - Development Framework'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_QPx57D_lFa8/Sssni4HEYBI/AAAAAAAAAkU/vqfMb-WAniM/s72-c/J2ME-Output.PNG' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-8854940136777674974</id><published>2009-09-23T20:33:00.002+08:00</published><updated>2009-09-23T20:34:07.128+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android 1.6 SDK'/><category scheme='http://www.blogger.com/atom/ns#' term='AVD'/><category scheme='http://www.blogger.com/atom/ns#' term='Donut'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android 1.6 Platform - "Donut"</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: inherit;"&gt;Hi Readers,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: inherit;"&gt;Welcome again and today we will discuss about Android 1.6 SDK. The Android developer team has announced the release of the Android 1.6 SDK on 15 Sep 2009, with the biggest news from the release support for different screen sizes, CDMA based networks. Donut is update with new battery usage feature which gives you the information of battery consumption by any application. Also there is update for camera application. We are going to discuss these features in detail now:-&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;Search Feature:-&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;Android 1.6 comes up with redesigned search feature, which helps user to search quickly, efficiently and consistently across multiple applications (Contacts, Browser, and the web) directly from home screen.&amp;nbsp;The system constantly learns which search result is more relevant based on what is clicked. So popular relevant contacts or apps which are previously used will bubble up to the top when user types the first few letters of a query. The search framework also provides developers a way to easily expose relevant content from their applications in Quick Search Box.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="http://1.bp.blogspot.com/_QPx57D_lFa8/SrNf8DTfK2I/AAAAAAAAAj0/whIqDyF24p4/s1600-h/Android-Search-Feature.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_QPx57D_lFa8/SrNf8DTfK2I/AAAAAAAAAj0/whIqDyF24p4/s320/Android-Search-Feature.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;Update for Camera:-&amp;nbsp;&lt;/b&gt;Android 1.6 also got the update for camera app also, now user can switch between still and video capture mode using one click easily. Other enhancement is faster load time when launching the camera app; Android team is claiming that the app will launch 39% faster and will also shave off 28% of the time needed between taking the pictures, which really help the end users. Now user has option to select multiple photos for deletion.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;Battery usage indicator:-&amp;nbsp;&lt;/b&gt;The feature I admire most is battery usage indicator. Using this app end user has all the information about battery consumption by each app, user can take action to save the battery life by adjusting settings, stopping app or even uninstall the app. You can pull up this app anytime available under settings or you can click on little button that popped up when the device tells you that you have 15% battery life remaining.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;Android Market Update:-&amp;nbsp;&lt;/b&gt;Android Market also got update interms of some features which are listed below:-&lt;/li&gt;&lt;ol&gt;&lt;li style="text-align: justify;"&gt;At the Home Screen, user can choose among Apps, Games and Downloads.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Inside the category, we have options to explore apps with in Top paid, Top free and Just in.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;User can also see some screenshot for application along with other user's reviews.&lt;/li&gt;&lt;/ol&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;Text-to-speech engine:-&amp;nbsp;&lt;span style="font-weight: normal;"&gt;Android 1.6 include multi-lingual speech synthesis engine called Pico, which allows any Android app to speak a string of text with an accent that matches the language. Language supported by engine: English (American and British accents), French, Italian, German and Spanish.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;Screen Resolution:-&amp;nbsp;&lt;span style="font-weight: normal;"&gt;Android 1.6 enables application to be rendered properly on different display resolution screens. Developers can also specify the screens supported by the application. Developer need to mark an entry in Android Manifest file with &lt;i&gt;&lt;supports-screens&gt;&lt;/supports-screens&gt;&lt;/i&gt;. If your application is run on a device whose screen size is not defined in the &lt;i&gt;&lt;supports-screens&gt;&lt;/supports-screens&gt;&lt;/i&gt; element, the system displays the application in compatibility mode, which performs best-fit match for screen resolution.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;Accessibility framework:-&amp;nbsp;&lt;/b&gt;With this framework, developers can create accessibility plugins that respond to user input, such as making a sound when a new window is shown, vibrating when navigating to the top of a list, and providing spoken feedback.&lt;/li&gt;&lt;ol&gt;&lt;li style="text-align: justify;"&gt;&lt;i&gt;android.accessibility&lt;/i&gt; package that includes classes for capturing accessibility events and forwarding them to an &lt;i&gt;AccessibilityService&lt;/i&gt; handler.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;i&gt;AccessibilityService&lt;/i&gt; package that lets your application track user events and provide visual, audible, or haptic feedback to the user.&lt;/li&gt;&lt;/ol&gt;&lt;li style="text-align: justify;"&gt;&lt;b&gt;Linux Kernel Upgrade:-&amp;nbsp;&lt;/b&gt;Android 1.6 includes the Linux kernel upgrades from 2.6.27 to 2.6.29.&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;You can download Android SDK 1.6 from &lt;a href="http://developer.android.com/sdk/1.6_r1/index.html"&gt;&lt;b&gt;Android Developer Site&lt;/b&gt;&lt;/a&gt;. But you need to give attention while installing Android 1.6 SDK, because there is also update available for ADT plug-in from 0.9.1 to 0.9.3. After that while upgrading your existing project open project and right click on project go to Properties, select the build target Android 1.6. Now open AndroidManifest.xml file and update the value of minSdkVersion from 3 to 4.&amp;nbsp;Now all are set you just need to create Android Virtual Device (AVD) and run your project.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-8854940136777674974?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/8854940136777674974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/09/android-16-platform-donut.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8854940136777674974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8854940136777674974'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/09/android-16-platform-donut.html' title='Android 1.6 Platform - &quot;Donut&quot;'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_QPx57D_lFa8/SrNf8DTfK2I/AAAAAAAAAj0/whIqDyF24p4/s72-c/Android-Search-Feature.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-3042475342435219500</id><published>2009-09-14T22:35:00.004+08:00</published><updated>2009-09-14T22:42:25.646+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Motorola CLIQ'/><category scheme='http://www.blogger.com/atom/ns#' term='Motoblur'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Motorola's first Android handset - CLIQ</title><content type='html'>&lt;a href="http://www.blogger.com/"&gt;&lt;/a&gt;&lt;span id="goog_1252931504619"&gt;&lt;/span&gt;&lt;span id="goog_1252931504620"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;After long time Motorola comes with new Android handset named "&lt;b&gt;Motorola CLIQ&lt;/b&gt;" at &lt;a href="http://events.gigaom.com/mobilize/09/"&gt;Mobilize 2009&lt;/a&gt;. Frankly speaking I am really waiting for Motorola's new device. First look of Motorola device is really impressive. Now one question is coming in your minds what is more special about it, there are already 4 to 5 handset present in market. So, readers it has something special in it; to find what is that we just explore this handset.&amp;nbsp;The specific feature which makes Motorola CLIQ different from other Android handset is "&lt;b&gt;MOTOBLUR&lt;/b&gt;". Customized home screens are the latest trend and&amp;nbsp;widely used in various devices, so Motorola come with custom Android UI.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Motorola's MOTOBLUR is not just an Android screen/theme, but an integrated service that pushes updates from almost all social networks straight to device's home screen. Some of the following features which we'll also see in upcoming Motorola's devices.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style="text-align: justify;"&gt;As I mentioned earlier social networking feature to the device screen. If you are very social person and use social networking apps frequently then MOTOBLUR is for you. You need to enter account information at the time of initial device setup and then enjoy need not to enter login&amp;nbsp;credentials&amp;nbsp;again. In addition to this, all social networking apps directly access device's core features.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Motorola develop so many widgets to home screen for social networks, RSS feeds and messages directly on the device's home screen. For example some feature widgets are Facebook, Twitter, Myspace, RSS feeds for sports, weather and entertainment etc. Point of attraction is contact and dialer application shortcuts.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Till now Android gives you the feature to sync your contacts with Gmail account, but Motorola take you&amp;nbsp;one step&amp;nbsp;ahead and provide a feature to sync your account with all the social networks. Each contact sync with latest pic, status update, contact info etc. The add-on feature is that you are able to see all the info on incoming call from that contact.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Universal message inbox that will collect message from contacts, email, message from Twitter, notes from Facebook and Myspace. User has facility to filter and view them all at once. Motorola got advantage by&amp;nbsp;delivering&amp;nbsp;it first as compared to Google's Wave service.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;Now you can update your status to all of your social networks with one click and publish your status update to all at once.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;The best thing about this device is&amp;nbsp;safety&amp;nbsp;and&amp;nbsp;security&amp;nbsp;feature. Suppose if you lost your phone then you can&amp;nbsp;remotely wipe data and&amp;nbsp;&amp;nbsp;restore that data to device with MOTOBLUR feature free of cost, whereas in Apple iPhone you need to subscribe to MobileMe for year which cost 99$.&amp;nbsp;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;It provides you a feature to share your images on the go. You can capture a image and upload it directly to the social networks and also add a caption to it. Each image is automatically sized and formatted according to the service you use.&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;I&amp;nbsp;appreciate and congrats Motorola for building a good device with good features. The technical specification of device is here:-&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://developer.motorola.com/products/handsets/cliq/"&gt;Motorola CLIQ - First Android handset&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-3042475342435219500?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/3042475342435219500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/09/motorola-first-android-handset-cliq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/3042475342435219500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/3042475342435219500'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/09/motorola-first-android-handset-cliq.html' title='Motorola&apos;s first Android handset - CLIQ'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-4279723533931468423</id><published>2009-09-07T19:09:00.002+08:00</published><updated>2009-09-07T21:13:42.883+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lightweight User Interface Toolkit'/><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT UI Components'/><category scheme='http://www.blogger.com/atom/ns#' term='J2ME UI Library'/><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT'/><title type='text'>Lightweight User Interface Toolkit (LWUIT) API and J2ME</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi All,&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Today I am going to discuss with you LWUIT UI API. &lt;b&gt;Lightweight User Interface Toolkit (LWUIT)&lt;/b&gt; is basically a UI library for JAVA ME  Platform. It helps developer to create visually attractive or rich interfaces for mobile applications and compatible with MIDP 2.0 and CLDC 1.1 devices. It provides Swing like functionality but without the tremendous power and complexity of Swing. LWUIT offers a basic set of components, layouts, themes and animated screen transitions. The hierarchy for these UI classes is as follows:-&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_QPx57D_lFa8/Sp5AmQpaf6I/AAAAAAAAAYA/t1M9vPi7cIM/s1600-h/Class+Hierarchy.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5376806031174827938" src="http://4.bp.blogspot.com/_QPx57D_lFa8/Sp5AmQpaf6I/AAAAAAAAAYA/t1M9vPi7cIM/s320/Class+Hierarchy.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The architecture of LWUIT is inspired by Swing, it has some features that are not available in Swings like themes, animation and painters etc. Features like MVC, layout managers, render, and EDT(Event Dispatch Thread) are similar to Swing. The LWUIT layer is present on top of the JAVA platform, runs on the CLDC and works with LCDUI. LWUIT library uses native rendering engine of device and renders onto GameCanvas. To understand this, we need to go through from LWUITImplementation and Display class of LWUIT library; LWUITImplementation is the foundation abstract class and extends the javax.microedition.lcdui.game.GameCanvas, and defines number of critical function. Now you can understand that for LWUIT application LWUITImplementation is the starting point (which is basically an object of GameCanvas) and used to draw all the components. The Display class is that which manage the painting and event handling with LWUITImplementation as a partner. It's used to show forms and start the EDT. Before any form is shown, we must register the MIDlet, by calling static method Display.init(MIDlet myMIDlet).&lt;br /&gt;&lt;br /&gt;Now you have dobout in your mind why we need to register MIDlet with Display class of LWUIT. The answer is very simple, the init method instantiates LWUITImplementation and invoke the init(MIDlet myMIDlet) method of LWUITImplementation and get the instance of javax.microedition.lcdui.Display class. Don't get confuse by two Display classes, we are going to use Display class of LWUIT API only for LWUIT application, because it internally call LCDUI Display class.&amp;nbsp;To start you need to download LWUIT jar file. The link for downlaoding and LWUIT API documentation is :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://lwuit.dev.java.net/"&gt;LWUIT&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I'll explain some components of LWUIT using small POC, so that you'll get good idea. First you need to create a project using any IDE and add LWUIT jar file to the project library, so that you are able to access LWUIT APIs.&lt;br /&gt;&lt;br /&gt;Now create a Java class LoginMidlet and implement ActionListener interface so that every action event get handle for application.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;public class LoginMidlet extends MIDlet implements ActionListener {&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;After that we need to register our MIDlet with LWUIT as I explain earlier,&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Display.init(this);&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;We are going to use some components of LWUIT APIs like Container, TextArea, Label etc. We'll use LWUIT Form component and arrange all other component on it.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Form appForm = new Form("Login LWUIT Form");&lt;/i&gt;&lt;br /&gt;&lt;i&gt;appForm.setLayout(new BorderLayout());&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Now we'll use Container to arrange all the other components. First we'll define the layout.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Container formContainer = new Container(new BoxLayout(BoxLayout.Y_AXIS));&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Now we'll define each component one by one, Firstly Label and then I am using TextArea for input; you can also use TextField according to your requirement.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Label uName = new Label("Username");&lt;/i&gt;&lt;br /&gt;&lt;i&gt;TextArea uNameTxt = new TextArea(1, 10, TextArea.ANY);&lt;/i&gt;&lt;br /&gt;&lt;i&gt;uNameTxt.addActionListener(new ActionListener() {&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void actionPerformed(ActionEvent actEvnt) { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (null != appForm) {&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;appForm.refreshTheme();&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;appForm.show();&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/i&gt;&lt;br /&gt;&lt;i&gt;});&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Label pwdLbl = new Label("Password");&lt;/i&gt;&lt;br /&gt;&lt;i&gt;TextArea pwdTxt = new TextArea(1, 10, TextArea.PASSWORD);&lt;/i&gt;&lt;br /&gt;&lt;i&gt;pwdTxt.addActionListener(new ActionListener() {&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void actionPerformed(ActionEvent actEvnt) {&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (null != appForm) {&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;appForm.refreshTheme();&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;appForm.show();&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/i&gt;&lt;br /&gt;&lt;i&gt;});&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;We defined the basic UI for our application now we need to arrange them and append to the Container.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;formContainer.addComponent(uName);&lt;/i&gt;&lt;br /&gt;&lt;i&gt;formContainer.addComponent(uNameTxt);&lt;/i&gt;&lt;br /&gt;&lt;i&gt;formContainer.addComponent(pwdLbl);&lt;/i&gt;&lt;br /&gt;&lt;i&gt;formContainer.addComponent(pwdTxt);&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;After that we need to add this formContainer to appForm:-&lt;br /&gt;&lt;br /&gt;&lt;i&gt;appForm.addComponent(BorderLayout.CENTER, formContainer);&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;To display the current form on the screen, we'll use-&lt;br /&gt;&lt;br /&gt;&lt;i&gt;appForm.show()&lt;/i&gt;;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Our basic POC is done and application will look like this.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_QPx57D_lFa8/SqSunG6BLAI/AAAAAAAAAjU/Vb8LIpuq440/s1600-h/LWUIT-Without-Theme.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/_QPx57D_lFa8/SqSunG6BLAI/AAAAAAAAAjU/Vb8LIpuq440/s320/LWUIT-Without-Theme.PNG" width="134" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now you are thinking that why we used LWUIT, what is special about it. The main difference using LWUIT, is the Resources and UIManager section. LWUIT help us to provide good UI for application. There are two concept &lt;b&gt;Styles &lt;/b&gt;and &lt;b&gt;Themes&lt;/b&gt;. We use style for individual component customization means if we want to put some special customization for one label only. For e.g.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Label uName = new Label("Username");&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Get the style object&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Style styleObj = label.getStyle();&lt;/i&gt;&lt;br /&gt;&lt;i&gt;styleObj.setBorder(null);&lt;/i&gt;&lt;br /&gt;&lt;i&gt;styleObj.setBgTransparency(0);&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Whereas, Themes are used to change the overall look and feel for application without programming. Themes are stored in resource files and loaded during runtime. We need to use this code in our application to laod a theme.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;try {&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Resources res = Resources.open("/res/loginTheme.res");&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;UIManager.getInstance().setThemeProps(res.getTheme("Test Theme"));&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;} catch (java.io.IOException ioe) {&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ioe.printStackTrace();&lt;/i&gt;&lt;br /&gt;&lt;span style="white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;}&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;After using this theme our application looks like this:-&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_QPx57D_lFa8/SqTTHKoNyeI/AAAAAAAAAjc/_P3sp1MRHS4/s1600-h/LWUIT-With-Theme.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/_QPx57D_lFa8/SqTTHKoNyeI/AAAAAAAAAjc/_P3sp1MRHS4/s320/LWUIT-With-Theme.PNG" width="134" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: 13px;"&gt;To create theme we use Resource editor. It is bundled with LWUIT library. You need to extract zip file and in util folder you'll find Resource Editor. The screenshot for Resource Editor is:-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_QPx57D_lFa8/SqTWs6Pk5pI/AAAAAAAAAjk/PijPBGXTQpg/s1600-h/Resource-Editor.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="166" src="http://2.bp.blogspot.com/_QPx57D_lFa8/SqTWs6Pk5pI/AAAAAAAAAjk/PijPBGXTQpg/s320/Resource-Editor.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;LWUIT is in early stage but still it has really good support on devices. To browse the LWUIT Device Database, Please visit:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;a href="http://wiki.java.net/bin/view/Mobileandembedded/DeviceDB"&gt;LWUIT Device Database&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;I hope this article help you to understand the basic architecture and features of LWUIT. Please let me know with your inputs.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-4279723533931468423?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/4279723533931468423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/09/lightweight-user-interface-toolkit.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/4279723533931468423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/4279723533931468423'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/09/lightweight-user-interface-toolkit.html' title='Lightweight User Interface Toolkit (LWUIT) API and J2ME'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_QPx57D_lFa8/Sp5AmQpaf6I/AAAAAAAAAYA/t1M9vPi7cIM/s72-c/Class+Hierarchy.png' height='72' width='72'/><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-7361241173564810847</id><published>2009-08-17T16:59:00.004+08:00</published><updated>2009-08-17T18:04:11.229+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Finding myself'/><title type='text'>What I really want from my life</title><content type='html'>Everyday I wake up at my room in morning and think is this the place where I really want to be? Sometimes I feel yes but most of the time I got answer no. Everyday I ask this question to myself. It's all about finding myself, and having the courage to admit certain things to myself, do things that scare me, and know that I'm doing the right things even when others question me. &lt;br /&gt;&lt;br /&gt;We all are part of such society where others already decided our future. My son will do this in future, my brother will do this in future or my husband will do this... bla bla.... What the @#$#$%. I don't want to be like others; I want to be ASHISH and I took different path in my life; Initially I faced some difficulties but I overcome these and now I am working with one of good firm and drawing handsome salary and feel little bit happy where I am. But still there is some thing that is missing from my life. I don't know what. I am really confused these days.&lt;br /&gt;&lt;br /&gt;Sometimes I thought in our society our target is already defined just like the interface where all the methods signature is defined and need to implement by ourself in our life class. I took this example because I am a programmer, I apologies who didn't like this. &lt;br /&gt;&lt;br /&gt;Being a child we need to study hard and get some good percentage, after that being a young guy we need to finish our degree and get some good job earn money and this race for money continues till we die. I agree we require money for good life but in this race we forgot how to live a happy life? Do we really happy with our life.... I don't know about others, but I don't and something is there that is still not part of my life... I am still running for that and even I don't know what is that... I hope some day I'll get the answer...&lt;br /&gt;&lt;br /&gt;I hope :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-7361241173564810847?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/7361241173564810847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/08/what-i-really-want-from-my-life.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/7361241173564810847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/7361241173564810847'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/08/what-i-really-want-from-my-life.html' title='What I really want from my life'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-2400183885997779811</id><published>2009-04-21T02:27:00.006+08:00</published><updated>2009-04-21T03:51:48.691+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Illustration for Mobile designing'/><category scheme='http://www.blogger.com/atom/ns#' term='Mobile Graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='Graphics Designing for Mobiles'/><category scheme='http://www.blogger.com/atom/ns#' term='Innovation in Designing'/><title type='text'>UI Designing and Innovation.....</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;Hi Friends,&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;This is my first post to our blog... and today I want to discuss about UI Designing and Innovation... Being a Graphic Artist.. I always want to break the rules in designing... because if you work with in some set of rules.. then you can't bring innovation in your work... And for making a small illustration or in simple words making a best UI you need lot of innovation in your mind without any set of rules.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;From last almost 4 years I am working with Mobile Application designing... and I found this area is still untouched for UI designing not for application designing even for the mobile handset UI designing. Now-a-days every person has mobile, and they are using it according to their dependencies or you can say according to their personalities or hobbies.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;I observed that from so many years.. we are using same grid-based or list based UI for mobiles, because we are restricted to the some set of rules. iPhone is a great breakthrough innovation in the mobile era, they bring touch screen interface but you observed they also have same grid-based UI.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;I hope some day any vendor will come with a device that will allow a user to set the UI for his/her mobile according to the user's basic information. Suppose if user is a Musician then his/her device has different UI may be some musical notes, or if user is an entrepreneur then UI is different.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;I know right now you are thinking about mobile phone themes... But themes can set some color and pictures for your mobile and not changes the device basic UIs or not affect the interaction and graphics design of the phone.&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Verdana;" &gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;That's why I told earlier you are thinking with in predefined set of rules...&lt;br /&gt;&lt;br /&gt;We can hope that in coming future we'll have devices that are more personalized in terms of content and UI.&lt;br /&gt;&lt;br /&gt;Friends please let me know with your thoughts about Graphics on Mobile,  WAP, and WEB. Soon I'll share more new things about graphics designing, and about Art field.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-2400183885997779811?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/2400183885997779811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/04/ui-designing-and-innovation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/2400183885997779811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/2400183885997779811'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/04/ui-designing-and-innovation.html' title='UI Designing and Innovation.....'/><author><name>Sona</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-7921450972155826967</id><published>2009-03-15T17:29:00.005+08:00</published><updated>2009-03-15T20:22:15.910+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mobile Application Version Upgrade using MIDP2.0 and MIDP 1.0'/><category scheme='http://www.blogger.com/atom/ns#' term='platformRequest()'/><title type='text'>Application Version Upgrade in MIDP 2.0 and MIDP 1.0</title><content type='html'>&lt;div align="justify"&gt;Hey Readers,&lt;br /&gt;&lt;br /&gt;First of all very nice good evening to all of you. I really appreciate your love and interest and special thanks to Rochak sir, who believe in my posts. If there is any mistake in my posts then please guide me; I am trying to share my knowledge with all of my readers and this will continue in future.&lt;br /&gt;&lt;br /&gt;Today I am going to share version upgrade for mobile application using J2ME in MIDP 2.0 and MIDP 1.0. Being a developer &amp;amp; entrepreneur you always want how to inform user about the application's version upgrade. Because you don't want to loose your customer and want to facilitate user by application's new features. The solution is as follows:-&lt;br /&gt;&lt;br /&gt;As a developer or even as a user, I always wish that if there is any version upgrade then please let me know at the startup of application even before Splash Screen appears. You can implement the version upgrade functionality in startApp() method. Even you can also store current version in the RMS. Take a look at the functionality:-&lt;br /&gt;&lt;br /&gt;protected void startApp() throws MIDletStateChangeException {&lt;br /&gt;try {&lt;br /&gt;&lt;br /&gt;/**Check the record store for available version.*/&lt;br /&gt;&lt;br /&gt;//fetch the latest available version from server and compare with stored version in RMS&lt;br /&gt;&lt;br /&gt;if (!versionStored.equals(availableVersion) &amp;amp;&amp;amp; optionalUpgrade) {&lt;br /&gt;optionalApplicationUpgrade();&lt;br /&gt;&lt;br /&gt;} else if (!versionStored.equals(availableVersion) &amp;amp;&amp;amp; mandatoryUpgrade) {&lt;br /&gt;mandatoryApplicationUpgrade();&lt;br /&gt;&lt;br /&gt;} else if(versionStored.equals(availableVersion)) {&lt;br /&gt;showSplashScreen();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;catch(RecordStoreException rse) {&lt;br /&gt;//If application is fresh installation then at startup you'll receive the RecordStoreException, because no record store available.&lt;br /&gt;&lt;br /&gt;/** Open record store and store current version of MIDlet. */&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now you are thinking what is the purpose of optionalApplicationUpgrade() and mandatoryApplicationUpgrade(); Both of these functions are very useful. Consider a scenario in which you update only the themes for application but it is not mandatory update because there is no functionality upgrade, in this scenario you can use optionalApplicationUpgrade() and ask user to allow upgrade. But user can may be skip this upgrade; whereas in functionality upgrade you can use mandatoryApplicationUpgrade() and user can't skip this upgrade.&lt;br /&gt;&lt;br /&gt;Till now we setup all the basic architecture for application upgrade, but how we are going to upgrade this is the basic query in your mind. Let's resolve that:-&lt;br /&gt;&lt;br /&gt;protected void updateApplication() {&lt;br /&gt;&lt;br /&gt;if (profile == MIDP2.0) {&lt;br /&gt;&lt;br /&gt;String applicationUpdateURL = http://www.upgradeurl.com;&lt;br /&gt;&lt;br /&gt;platformRequest(applicationUpdateURL);&lt;br /&gt;&lt;br /&gt;/** Store the updated version of application in RMS */&lt;br /&gt;&lt;br /&gt;} else if(profile == MIDP1.0) {&lt;br /&gt;&lt;br /&gt;/** Display information to the user for manually upgrade application or you can also send information to the application server to send a WAP push message. */&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Using updateApplication() method you can handle functionality for both MIDP1.0 and MIDP2.0, because platformRequest() method is not supported in MIDP1.0; so either you display the information to user or you can push the wap push message to user by sending a specific format message to the OTA server.&lt;br /&gt;&lt;br /&gt;This is all about J2ME application upgrade, If I miss something or you have any doubt then please let me know. I'll try my best to explain each of your queries.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-7921450972155826967?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/7921450972155826967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/03/application-version-upgrade-in-midp-20.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/7921450972155826967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/7921450972155826967'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/03/application-version-upgrade-in-midp-20.html' title='Application Version Upgrade in MIDP 2.0 and MIDP 1.0'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-8497808077105677735</id><published>2009-03-07T01:39:00.007+08:00</published><updated>2009-11-24T20:05:44.932+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unit Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='J2MEUnit'/><category scheme='http://www.blogger.com/atom/ns#' term='TearDown'/><category scheme='http://www.blogger.com/atom/ns#' term='TestCase'/><category scheme='http://www.blogger.com/atom/ns#' term='SetUp'/><category scheme='http://www.blogger.com/atom/ns#' term='JMUnit'/><category scheme='http://www.blogger.com/atom/ns#' term='Difference between J2MEUnit and JMUnit'/><category scheme='http://www.blogger.com/atom/ns#' term='TestSuite'/><title type='text'>J2ME &amp; Unit Testing</title><content type='html'>&lt;div align="justify"&gt;Hi Friends,&lt;br /&gt;&lt;br /&gt;As you came to know from the blog title that today we are going to discuss about unit testing approach for J2ME. Before moving further, let's first understand unit testing. Most of the Mobile Application developer think that unit testing is same as the functionality testing which is not true. Functionality testing comes in picture when application installed on mobile and then we test the proper functionality of the application as per the product specification; where as unit testing comes in picture at your code level. In simple words, &lt;strong&gt;Unit Testing&lt;/strong&gt; is an approach that provides confidence to the developer that given piece of code written by him/her are fit for use.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;To support unit testing in JAVA we have JUnit Framework, we cannot use same framework for J2ME because JUnit rely on Java Reflection API whereas reflection API is not part of J2ME environment. So there is refine version of JUnit for mobile application unit testing. Actually there are two:&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;a) J2MEUnit &lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;b) JMUnit&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;Both are Open Source and used for unit testing approach, but JMUnit has better approach for same. JMUnit has rich set of assert methods as compared to J2MEUnit. In future there are planning to merge these two frameworks into one &amp;amp; emerging framework will have the features of both.&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;strong&gt;My Experience with JMUnit:-&lt;/strong&gt; &lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;I used JMUnit in our project and trying to share my experience with all of you. You can use ANT task for running your unit tests. The basic approach for unit testing is that write test cases for those classes which internally call other class's methods, so that you need not to write test cases twice. For example, You can write test cases for one class that manage all the UI related functionality, second that manage RMS related functionality, third that manages data objects, fourth that manage HTTP/HTTPS connections, and the last one is your request and response objects. Suppose you have some abc() method in any class then you should write your testclass with method name testAbc() and test your code scenario as per the requirement. The basic architecture of test class is as follows:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;First you have two import JMUnit APIs according to the CLDC&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;i) jmunit.framework.cldc10.*; //or&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;ii) jmunit.framework.cldc11.*;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;Now basic skelton of a class--&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;public class Xyz extends Testcase {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;public Xyz() {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;super(int totalTests, String xyzTest);&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;public void setUp() {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;// define any object or any initialization as per your requirement.&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;public tearDown() {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;// release memory.&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;public void testAbc() {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;// write your test case&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;public void test(int testNumber) throws Throwable {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;switch(testNumber) {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;case 0:&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;testAbc();&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;break;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;default:&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;break;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;When you write all the test cases for your defined classes then you can combine them to in a TestSuite class so that each test will run using your ant script. The architecture for TestSuite class is as follows:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;public class AbcTestSuite extends TestSuite {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;public AbcTestSuite() {&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;super("Test Suite");&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;add(new Xyz);&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;add(new .......);&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;Now in the ant script you have to map the JMUnit jar files and you can also specify your test classes, source and reports directory path so that each will move to there respective folder and at the end html based reports will get generated.&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;strong&gt;Issues:&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;1) I am not able to test the RMS value.&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;2) Also not able to test the UI Classes screen transition.&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;div align="justify"&gt;As per their documentation, I am able to run emulator from ant script but still not able to test both of them. If someone earlier also faced this problem and got any solution.... Please let me know. &lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;I tried to share all the facts related to mobile application testing using JMUnit. If I forgot something please update me with your comments.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-8497808077105677735?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/8497808077105677735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/03/j2me-unit-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8497808077105677735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8497808077105677735'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/03/j2me-unit-testing.html' title='J2ME &amp; Unit Testing'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-3947218489414481021</id><published>2009-02-04T01:19:00.013+08:00</published><updated>2009-02-04T03:00:39.045+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='J2ME'/><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='Optimization'/><title type='text'>MVC, Design Patterns, J2ME, Optimization</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Dear All,&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;Welcome again....&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;Today I have some specific things to share with all of you... As you all came to know from the title of this article that we are going to discuss MVC approach in J2ME. Earlier I used modular approach to develop mobile application, but now I am exploring more on MVC approach in J2ME and I came to know it is really helpful to develop the secure and modular application. Some of you are well aware of this approach and mostly used in your projects. But some of you may be yet not used such kind of approach in your projects then this article may help all of you. I'll try my best to make you understand this approach using J2ME.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;For example suppose we have simple application in which user can login and after login user can access some kind of information. Then first of all we can design our application in such a way that data of one class will not exposed to other classes. Suppose all of UI classes will have access using one single class, I name it UIController you can name it as per your requirement. Now all other classes like ModelFacade, &amp;amp; ConnectionManager will interact to LoginUI using UIController and no method of RMS and ConnectionManager will exposed to LoginUI. UIController have one method named it as showLoginUI(), which will take care to display Login screen for application.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;Whereas ModelFacade is a class that have single point contact between RMS Class and other classes, so that no stored data will exposed to other classes (Other classes don't have any idea about the content). In same manner ConnectionManager class will manage only HTTP and HTTPS connections and will have logic to connect with server.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;Only methods have public access in any class and if you want to use any variable in any other class, then use getter/setter method for that variable.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;If you design your application in such a way then there is no security loophole. Try to follow this approach, it really helps you while developing application and also help you in real time testing.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;To optimize your application you must follow the Java coding standards, also don't create too much objects because they will cause memory loss. If reference is already present then use that don't create new. For eg. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;If ( exampleObj == null ) {&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;createObject();&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;else {&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;//do something..&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;If you are using images in your application then used well optimized images.. consult with graphics team. Avoid multi - dimensional arrays in J2ME. Always use pre - computing. Avoid for loop statements if possible, use switch cases and if statements or you may use only those statement in loop which require repeated execution(for loop tightening). &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;As we know that Java handle garbage collection itself, but while exception occurred and screen transition is there then call System.gc() explicitly. It'll also help you to reduce memory usage by application.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;I hope this article will help you. If you have any suggestions and comments please let me know.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:verdana;font-size:13px;"&gt;Now time to log off, will meet you with some other topic.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-3947218489414481021?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/3947218489414481021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/02/mvc-design-patterns-j2me-optimization.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/3947218489414481021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/3947218489414481021'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/02/mvc-design-patterns-j2me-optimization.html' title='MVC, Design Patterns, J2ME, Optimization'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7269812144653400123.post-8140528095059642285</id><published>2009-01-31T20:56:00.006+08:00</published><updated>2009-09-20T03:56:19.616+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ashna Technologies'/><category scheme='http://www.blogger.com/atom/ns#' term='Ashna'/><title type='text'>Welcome</title><content type='html'>&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;Dear all,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;Welcome to our blog...&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;Right now may be some thoughts are going on in your mind. May be you are thinking that, in this blogging era same another blog addict is publishing few lines. But I have a reason for this, actually I want to share my thoughts with all of you... of-course I can share same with you using mail etc. but as you all know how seriously we read mails... plus the major reason to publish a blog is to get reactions from best critics all over the world. Such type of debates will increase our knowledge and may be change our preception towards some situations and scenearios.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;Thats why I used this space for sharing my knowledge, thoughts, latest technical trends, latest innovations etc. In addition to technical things one of my close friend will also share latest designing trends, her preception towards sketching, painting, graphics etc...&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;We both have humble request to all of you to post your comments.... So that we will increase our knowledge base.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;Thanks for your patience&lt;/span&gt;&lt;/span&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana;"&gt;Now time for log off will meet you soon....&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7269812144653400123-8140528095059642285?l=ashnatechnologies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashnatechnologies.blogspot.com/feeds/8140528095059642285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/01/welcome.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8140528095059642285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7269812144653400123/posts/default/8140528095059642285'/><link rel='alternate' type='text/html' href='http://ashnatechnologies.blogspot.com/2009/01/welcome.html' title='Welcome'/><author><name>Ashish</name><uri>http://www.blogger.com/profile/11740420953705556548</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
