Saturday, July 17, 2010

Block a Call

Hi Readers,

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.

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:-

Suppose we are targeting XYZ market and the device penetration ratio is as following for that market segment:-
  • Nokia S60 & other Symbian  devices - 45%
  • Nokia S40  & other Java devices - 30%
  • Android, iPhone, Blackberry  & other devices - 25%
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.

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.

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.

Google Dev Fest @ KL

Hi Readers,

Today I went to Google's Dev Fest @ KL, almost 400+ Google APIs fans were there. I hope everyone had great time @ Technology Park Malaysia, & really it was a great event. I learned a lot and hopefully I'll try to provide you some insight about Google's Dev Fest. So let's start:-

Google Dev Fest started with an introduction on what the DevFest day would cover by Christine Songco, Program Manager for Developer Relations @ Google & by Nazrul Kamaruddin, Community Manager at GTUG Kuala Lumpur.

After this, Daniels Lee a Googler who supports developers with Google MAPS Javascript API V3 ran through several code snippets & describe the various features list of V3, such as:-
  • Map Controls (Default UI, Position Custom Controls, etc.)
  • Overlays (Markers, Icon, Polylines, Ploygons, Custom Overlays, etc.)
  • Map Events (MVC properties with event handlers, UI events, etc.)
  • Map Services (Directions, Elevation, Geocoding, Street View, etc).
For more references you can have a look on these links, listed as below:-
  1. Google MAPs Javascript API V3
  2. Good Articles
Note: MAP API V3.0 doesn't require API developer key, & also Beta released for Places APIs but require API developer key to use in different WEB, WAP & Mobile apps. Daniels Lee also showcase one app that is developed using Google MAPs Javascript API V3. You can find app @ Where is Coffee? & source code for same app is available @ Coffee Source Code.

Presentation Links:-
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 Patrick Chanezon a cool Googler. He explained HTML5 quite impressible way, though during his presentation WiFi was not good. Few of the best points of HTML5 are listed as follow:-
  • HTML5 (HTML + CSS + JS APIs)
  • Web Storage
  • Web SQL Database
  • Web Sockets
  • Canvas
  • Audio
  • Video
  • New form field types
  • Canvas 3D (WebGL)
  • SVG in HTML5
  • New Font Support in CSS
  • Instant Web 2.0 Logo Creatr & many many more..
For all the HTML stuff please visit the presentation @ HTML5 Presentation. Some of the useful resources for HTML5 is as follows:-
  1. HTML5 Tutorial
  2. References
  3. Dive into HTML5
  4. HTML5 Demos
  5. HTML5 Drum Kit
  6. Effect Games (Based on HTML5)
  7. SVG Editor HTML5 based tool
You can also provide support for HTML5 on IE 6, 7 or 8 by using Google Chrome Frame. You can also have a look on Chrome Frame Developer Guide.

After this we moved towards the Open Social APIs, the session was taken by Tim & 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.  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 & the Object. Open standards are really cool and Google Buzz are using all of them in Buzz such as OAuth, RESTful calling style to access JSON data structures, oacurl 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 Buzz Docs. You can also have a look on few links listed as below:-
  1. Buzz Libraries & Sample Applications
  2. Boxee (Fully utilize Google Buzz)
  3. Buzz Bingo
You can have a look on the Googler's Presentation @ The Google Buzz API And You

After this healthy & interactive session, Patrick Chanezon is again on the stage with a session on Cloud Computing. He shared Google's presence in the cloud computing space & also shared the fact that 2 million companies use google apps to increase company revenues. Now I/O Chrome Webstore is renamed as Google Apps Marketplace & shares 20%  of Google revenue. Socialwok is an example of a enterprise apps on Google Apps Marketplace - based @ Singapore. Patrick Chanezon also suggest more people should use Google App Engine to serve static content.

Updates:- Cloud Computing Presentation 

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.

In addition to this, few developers & companies showcased their products. Few of them are listed as below:-
  1. Chrome Extension for Google Dev Fest: Leonard Lee showcased the Chrome extension developed by him & totally based on HTML5, CSS, JS & JSON. You can install it from here -  Google Dev Fest Chrome Extension & information about Google Chrome Extension is here - Tutorial.
  2. Terato Tech: Terato Tech rocked the Google Dev Fest with their mobile app - "Undies: What are you wearing today?" This app is based on social networking & made a good use of Google MAP APIs for mobile applications.
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 apologies for that. You may correct me and  also let me know with your inputs and experiences @ Google Dev Fest.

Wednesday, July 14, 2010

How to make a call in J2ME?

Hi Readers,

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 & make a call on that number, also you can directly enter any international format number and make a call. So let's start:-

Here I'll show you two things - 1) Fetch contacts from your device phonebook, & 2) Make a Call

1) Fetch Contacts from your device phonebook:
We can do this activity in two ways - a) By using JSR 75 API, & b) By using TextField property constraint.

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:-

TextField numberTxtField = new TextField("Please enter the number:", numberString, 12, TextField.PHONENUMBER);

When you use this code in your app, then on real device when the focus is on "numberTxtField" you will see the commands to "Search" on Nokia devices & "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. 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.

2) Make a Call:
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 - http://en.wikipedia.org/wiki/URI_scheme

The code will look like this:-

private boolean makeACall() {
        boolean isCalled = false;
        
//used to read the number from textfield
        numberString = numberTxtField.getString(); 
        try {
            if (numberString.indexOf("+") != -1) {
                isCalled = this.platformRequest("tel:" + numberString);
            } else {
                isCalled = this.platformRequest("tel:+" + numberString);
            }
            try {
                pauseApp();
                notifyPaused();
            } catch (Exception e) {
                //Nothing to do..
            }
        } catch (IllegalArgumentException e) {
            isCalled = false;
            //Handle the functionality for wrong format of number
        } catch (Exception ex) {
            isCalled = false;
        }
        return isCalled;
    }

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. The users who are looking for this functionality can let me know with their inputs. 

Thursday, July 1, 2010

Cisco's Android-Based Cius Tablet

Hi Readers,

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 Cisco Cius 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 & serious competitor to the Apple's iPad tablet. Apple iPad is best suited for content delivery and that's what it does best & 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.

Cisco Cius Enterprise Tablet PC
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:-

Product Features:-
  1. 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.
  2. 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.
  3. 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.
  4. Cisco Cius features an eloquent contacts-driven user experience, designed to enable users to quickly reach their important contacts.
  5. An on-board accelerometer readily orients applications for viewing in portrait or landscape modes as users rotate the device to their preferred viewing orientation.
  6. 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.
  7. A detachable and serviceable battery offers eight hours of life under normal usage.
Enterprise Features:-
  1. Cisco Cius provides support for the comprehensive suite of Cisco collaboration applications including Cisco Quad, Cisco Show and Share, Cisco WebEx Connect, Cisco WebEx Meeting Center, Cisco Presence, and interoperability with Cisco TelePresence.
  2. Cisco Cius is supported by Cisco Unified Communications Manager and is easily integrated into existing Cisco customer environments.
  3. Cisco Cius helps ensure a more secure mobile collaboration experience by leveraging Cisco AnyConnect VPN Security, part of the Cisco Borderless Networks architecture.
  4. 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.
  5. 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.
  6. 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).
Cisco's Cius vs Apple's iPad:-
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 & the iPad, also the fact that it ties into Cisco's existing collaboration assets.

Note: In addition to this Cisco also unveiled another tablet for Home Energy Management solution which runs on Ubuntu.