Thursday, October 21, 2010

Replace a part of string with another

Generally java provides a code to replace a character.This code helps you to replace a part of string with a new string in JAVA.All you need to do is pass the completeString ,oldString,new String as params to the below method.The occurrences of old string in complete string is replaced by new string .

This can be achived by string Buffer,but just i tried out with String ;)



public static String replace(String totalString,String oldString,String newString){

//offset is 0,means we are serching oldString from index 0

int offset=0;

StringBuffer temp=new StringBuffer();

try{

while(totalString.indexOf(oldString,offset)!=-1&&offset< span=""><>

//the loop iterates until index is -1

//example:totalString:text ,oldString:ex newString:ax

temp.append(totalString.substring(offset, totalString.indexOf(oldString,offset)));

//temp has value ‘t’

temp.append(newString);//value of temp is ‘tax’

offset=totalString.indexOf(oldString,offset)+oldString.length();

}

if(offset< span=""><>

temp.append(totalString.substring(offset));

//value id temp is ‘taxt’

}

}catch (Exception e) {

System.out.println("Array out of bound of exception");

}

totalString=temp.toString();

return totalString;

}

Wednesday, October 6, 2010

error 10054 during TCP read:J2me connecting to network

IoException:error 10054 during TCP read.The error ocured for me.I found that there is no proxy and authentication set in ktoolbar(C:\WTK22\bin\ktoolbar.exe) .After i set the info there is no tcp error again.


reference:http://developers.sun.com/mobility/midp/articles/wtk104/

Tuesday, August 31, 2010

Error in Jvm acess violation reading from 0x00000000 in Blackberry

Error in JVM access violation reading from 0x00000000 in Blackberry.If the simulator says like this while starting and forcing you to exit then,

1)Go to simulator installed path.For me C:\Program Files\Research In Motion\BlackBerry Smartphone Simulators 4.6.0\4.6.0.259 (8220)

2)Delete all files with .dmp extension.

3)Restart the simulator

Hope works fine...

Wednesday, August 25, 2010

current language set on Device ,J2ME

In J2ME ,current language set on the device can be known using a single line code

String locale=System.getProperty("microedition.locale");

List of Languages supported by the device can't be known through J2ME API as per my knowledge.

Monday, August 23, 2010

TimeZones and Timezone offsets in Blackberry and J2me

In J2me , a class called TimeZone is used to determine offset of timezone.

First get all the Ids by


tring ids[]= TimeZone.getAvailableIDs();
for(int i=0;i&lt;0;i++){
    // will give you the  TimeZone offsets such as +5,-4 etc.
    TimeZone.getTimeZone(ids[i]).getRawOffset();
}

// will return the timeZone offset set in the device.
TimeZone.getDefault().getRawOffset();

TimeZone class is applicable for both Blackberry and J2ME


From Blackberry 4.6 a new class TimeZoneUtilities is intoduced.

Just use the following code to retrieve array of Timezones
     
String str[]=TimeZoneUtilities.getDisplayNames(0);


The above code will give the list of important places and their corresponding timezones where as TimeZone class willl give only TimeZones (without city name).

Gps in J2me,Blackberry

GPS(Global positioning system) can be achieved using Location API which is an optional package for J2ME.Blackberry also uses the same APi for GPS.Location APi(Jsr 179) is provided by nokia.

the code for getting the latitude and longitude is:
Criteria c=new Criteria();
c.setHorizontalAccuracy(1000);
c.setVerticalAccuracy(1000);
c.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
LocationProvider lp=LocationProvider.getInstance(c);
Location loc=lp.getLocation(60);
QualifiedCoordinates qc=loc.getQualifiedCoordinates();

Latitude can be retried by qc.getLatitude()
Longitude can be retrieved by qc.getLongitude()

these latitude and longitude can be then provided to google static maps to get relevant maps.
some google urls are
http://maps.google.com/maps/api/staticmap?zoom=14&size=200x200&maptype=roadmap&markers=color:red|label:S|40.714728,-73.998672&sensor=false
The above url will give a static map with pointing marker.

List of languages supported by Blackberry device

In order to know about the list of languages supported by blackberry device use Locale Class .


Locale supportedLocales[]=Locale.getAvailableLocales()

gives the list of locales in the device.

supportedLocales[i].getLanguage()


returns the string,which is the language of that corresponding locale.

see also

supportedLocales[i].getCountry();
Locale.getDefault();





Connections in Blackberry and DeviceSide

There are 5 different ways to connect to internet using Blackberry.They are
1)BES(Blackberry EnterPrise Server) using MDS(Mobile Data System)
2)BIS(Blackberry Internet Services)
3)Direct TCP/IP
4)WIFI Network
5)WAP(Wireless Application Protocol) Gateway


By using BES we can directly pass url as connection parameter without appending any deviceSide.

(HTTPConnection)Connector.open("http://www.blackberry.com");

While connecting to internet using BES the connection pathway is MDS by default except for some devices(6500,7500).In order to explicitly connect using MDS in all append deviceside=false at the end of the URL.

(HTTPConnection)Connector.open("http://www.blackberry.com;deviceside=false");

From Blackberry 3.8 there is a possibility for direct TCP/IP connection without using MDS.
For Blackberry smartphones operating using IDen networks(developed by Motorolla) a direct TCP connection is established if deviceside is not specified.For Blackberry smart phones doesn't operate on IDen networks Connection is established through MDS if deviceside is not specified.If blackberry MDS is not available during time of connection a direct tcp is established.

To override the default behavior of connection append deviceside=true at the end of url.

(StreamConnection)Connector.open("socket://testserver:600;deviceside=true");

In Wifi connections Blackberry smart phone is directly connected to blackberry infrastructure via WIFI.Blackberry Infrastructure exists between blackberry smart phone and BES or BIS.For the connections through WIFI no special logic is required except appending ;interface=wifi to the required url.

(StreamConnection)Connector.open("socket://testserver:600;interface=wifi");

In WAP connections Connection string parameters are hosted by wireless network provider.

References:

http://supportforums.blackberry.com/t5/Java-Development/Different-ways-to-make-an-HTTP-or-socket-connection/ta-p/445879


Complete reference:

http://supportforums.blackberry.com/t5/Java-Development/Connecting-your-BlackBerry-http-and-socket-connections-to-the/td-p/206242

Glance on networks in blackberry:
Some Video tutorials:

http://www.blackberry.com/DevMediaLibrary/view.do?name=NetworkingTransports

http://www.blackberry.com/DevMediaLibrary/view.do?name=NetworkingTransportsII

Wednesday, July 28, 2010

InvalidJadException: Reason = 22 emulator doesn't start in J2Me

I got the problem in Netbeans 6.8.When a Midlet is copied without creating,the problem occurs InvalidJadException.If you are facing the same exception the following may help you.

Do the following and remove the exception.
  1. Go to nbproject folder in your project.Under this folder find "project.properties" file.
  2. Edit "project.properties" file.Search for "manifest.midlets="
  3. Set the value of "manifest.midlets=MIDlet-1: MidletName, , PackageName\n"
For my project i set the value to
manifest.midlets=MIDlet-1: SampleMidlet, , com.j2me.mobile.sample.SampleMidlet\n

Spaces are compulsory.Place the space after : and before packagename.
If you are using notepad use \n at end .

References:

http://tecknolojia.blogspot.com/2008/03/invalidjadexception-in-netbeans.html

InvalidJadException: Reason = 22 emulator doesn't start in J2Me

When a project is copied without creating,the problem occurs InvalidJadException.

Do the following and remove the exception.
  1. Go to nbproject folder in your project.Under this folder find "project.properties" file.
  2. Edit "project.properties" file.Search for "manifest.midlets="
  3. Set the value of "manifest.midlets=MIDlet-1: MidletName, , PackageName\n"
For my project i set the value to
manifest.midlets=MIDlet-1: SampleMidlet, , com.j2me.mobile.sample.SampleMidlet\n

Spaces are compulsory.Place the space after : and before packagename.\n is to indicate to go to next line if you are editing in a notepad or editplus.

Tuesday, July 27, 2010

MIME Types supported by BlackBerry Devices

Inorder to know about the Mime Types supported by a simulator you are running,just pass null as parameter in the getSupportedcontentTypes as shown below..
String protocols[]=Manager.getSupportedContentTypes(null);
System.out.println("the supported typed are:");
   for(int i=0;i&lt;protocols.length;i++){
       System.out.println(" "+protocols[i]);
   }


Friday, July 23, 2010

Managers in Blackberry

There are 5 Field mangers in 4.5 JDE and newly 3 Field managers added in 5.0 JDE .

[4.5 JDE]

DialogFieldManager,VerticalFieldManager,HorizontalfieldManager,screen and FlowFieldManager.
#1)DialogFieldManager:
DialogFieldManager is a manager in which the layout consists of an icon,message,Fields.The icon is on the top left side and the respective message is on the top right corner.Message is a RichTextField.The fields are added like a body for he DialogFieldManager.We have to add it to the screen inorder to display.

The following shows the layout.
------------------
| Icon Message |

| Field1 |
| Field2 |
| ....... |

-------------

Some of the methods are.....
setIcon(BitMap bitmap),setMessage(RichTextField rch)


#2)VerticalFieldManager

The VerticalFieldManager adds fields in a vertical order.We can add Fields and Managers to this VerticalfieldManager.This VerticalFieldManager can be scrollable.We can set that styles in Constructor.VerticalFieldManager can be added to screen.

VerticalFieldManager Layout
------------------
| Field1 |
| Field2 |
| Field3 |
| ........... |
------------------

#3)HorizontalFieldManager
The HorizontalFieldManager adds fields in a horizontal order.We can add Fields and Managers to this HorizontalFieldManager.This HorizontalFieldManagercan be scrollable.We can set that styles in Constructor.HorizontalFieldManagercan be added to screen.

HorizontalFieldManager Layout
----------------------
| Field1 Field2 Field 3 |
-----------------------

#4)FlowFieldManager

FlowFieldManager has a special type of property.It acts both like a vertical FieldManager and HorizontalManager.Firstly it acts fields in horizontal way.If the field exceeds the screen length next fields are added in next row.That is it adds the fields in flow.

FlowFieldManager Layout
------------------
| Field1 Field2 |
| Field3 Field4 |
| Field3 .......... |
| ...................... |
------------------
#5)Screen:

The concept of screen is different to other Managers.Base class for all screens. Each UIEngine presents an interface to the user by pushing screens onto its display stack, and popping them off when interaction with the managed fields on that screen is finished.Screen is an abstract class.
The sub classes of Screen are:
PopupScreen and FullScreen.
Constructors o f screen contains a DelegateManager as argument.We have to send aManager inorder to invoke his abstract Class.

#a) PopupScreen:
PopupScreen is a screen which appears like a popup as mentioned in name itself.PopupScreen is pushed on to the screen and it appears continuously until it is poppedup functionally.By default it is not popped up by pressing any keys.If you want to customise your popupScreen then go for PopUpScreen.OtherWise there are some subclasses for popupscreen which provide som regularily used functionality like Info,Alert,status.
SubClasses of PopUpScreen are :
Dialog,Status.

Dialog:
Dialog is a subclass of popuspscreen.Unlike all other screens Dialog can be pushed automatically without using UIApplication.PushScreen(Scren).Dialog are of two types.Alert,Inform.We can directly call Dialog.Alert(String) and Dialog.inform(message) which will automaticaly pops a popup having Ok and Cancel buttons for Alert and Ok button for inform.The icon also changes for both of them.If you want to customise a Dialog and you want to push the Dialog manually,go for the Constructor and push Dialog using PushScreen(Screen).
We are having several Styles such as CANCEL,D_DELETE,D_OK,D_OK_CANCEL,D_SAVE,D_YES_NO etc....which can be used in our dialog by applying these styles in constructor.

Status:

Status has same functionality as Dialog but diffeence is it doesnt have any buttons.We can keep a time limit for the status.If we press space or esc it will disappear.


#B)FullScreen:
A screen that contains a single, vertical field manager.It is a subclass of Screen.Is has a subClass MainScreen which is widely used screen.

MainScreen:
SubClass of FullScreen.Main screen objects contain a title section, a separator element, and a main scrollable section.We can add Managers and fields to it .Than push this Screen.
Methods:
mainScreen.add(Field field);
mainScreen.addMenuItem(MenuItem menuItem);

There are few other Managers which are added in
JDE 5.0.
they are BrowserField,AbsoluteFieldManager and GridFieldManager.

[27/07/10]
#1)BrowserField:

Upto Jde 5.0 if you want to hit an url or a web page ,the process is to hit browser which is an external application.Now by using BrowserField we can embed the browser within the java application.No need to call an external application.The process to initialise this browserfield involves three steps.They are:
  • Instantiate Browser Field
     BrowserField browserField = new BrowserField();
  • Add browserField to UiManager or Screen
     screen.add( browserField );
  • Request the content to display.This method call is done only once.
     browserField.requestContent( "http://blackberry.com" );
There are are 2 constructors for BrowserField.
  1. BrowserField()
  2. BrowserField(BrowserFieldConfig config)
Some methods involve back(),forward(),refresh() etc...

#2)GridFieldManager:
GridFieldManager is introduced in Blackberrry JDE 5.0.GridFieldManager is having fixed number of rows and columns.We can insert an element in a specific row and column using insert() or if you use add() method the fields are added like a FlowFieldManager one after other(First horizontally and then cumming to next row).

Row and column heights and widths may be specified as fixed sizes or may be automatically sized with the available space divided evenly among the rows and columns.

The grid will scroll vertically if the heights of the rows exceeds the visible height of the grid, and will scroll horizontally if the widths of the columns exceedst he visible width of the grid.

There is only one constructor

GridFieldManager(int rows,int columns,long style);

#3)AbsoluteFieldManager:

This is not having a JavaDoc upto now.No reference available for AbsoluteFieldManager as per my knowledge.If there is reference please comment me the link.



Reference:

http://www.blackberry.com/developers/docs/4.5.0api/index.html

http://www.blackberry.com/developers/docs/5.0.0api/





Friday, July 16, 2010

Get default currency value from BB device

If you are looking to get the default currency from your code you have to go for
RadioInfo.getMCC(RadioInfo.getCurrentNetworkIndex()).

Mcc means the Mobile country code.

public String setCurrency()
{
String currency="$";//default currency symbol
String array[]={"€","$","Rs","BZ$","£","R$",
"₪","R","¥","₩","руб","CHF"};
//all Character is in UTF-8. and copy from the http://www.xe.com/symbols.php
String euro[]={"225","204","278","270","222",
"208","206","202","272","293","214"};//MCC for the country which used euro sign
String pound[]={"417","248","602","348","274","266","415"
,"360"}; //MCC for the country which used pound sign
int li_Radio = RadioInfo.getMCC(RadioInfo.getCurrentNetworkIndex());
String x = Integer.toHexString(li_Radio);//MCC for country.
boolean flag=false;
for(int i=0;i<euro.length;i++)
{if(x.equals(euro[i])){flag=true;
currency=array[0];//set Euro currency symbol
break;
}}
if(flag==false){
for(int i=0;i<pound.length;i++){
if(x.equals(pound[i])){
flag=true;
currency=array[4];//set Euro currency symbol
break;
}}}
if(flag==false){
if(x.equals("724")){
currency=array[3];//set Brazil currency symbol.
}else if(x.equals("425")){
currency=array[6];//set Israel currency symbol.
}else if(x.equals("655")){
currency=array[7];//set SountAfria currency symbol.
}else if(x.equals("467")||x.equals("450")){
currency=array[9];//set Koria currency symbol.
}else if(x.equals("441")||x.equals("460")){
currency=array[8];//set China or Japan currency symbol.
}else if(x.equals("413") || x.equals("404") || x.equals("405") || x.equals("410") || x.equals("429")){
currency=array[2];//set India or Nepal or Pakistan or Srilanka currency symbol.
}else if(x.equals("250")){
currency=array[10];//set Russian currency symbol.
}else if(x.equals("228")){
currency=array[11];//set Switzerland currency symbol.
}}
return currency;
}

First go to project property and click Text File Encoding checkbox to other and set encoding to UTF-8.

This code work on real device not in simulator.Set currency according to MCC and check current mobile network.


#2)Another method if you are not having a network carrier and you are using wi-fi

This code is set to currency symbols according to phone language setting.

public static String setCurrency()
{
String currency="$";//set $ as a default currency.
String array[]={"$","£","€"};
String x = Locale.getDefaultForSystem().toString();//MCC
if(x.equalsIgnoreCase("fr")){
currency=array[2];//set € symbol.
}else if(x.equalsIgnoreCase("es")){
currency=array[2]; //set € symbol.
}else if(x.equalsIgnoreCase("en_us")){
currency=array[0];//set $ symbol.
}else if(x.equalsIgnoreCase("en_gb")){
currency=array[1];//set £ symbol.}
return currency;
}

By the above method we can get through the languages which are supported by the device.

reference:

http://supportforums.blackberry.com/t5/Java-Development/how-to-get-default-currency-value-from-BB-device/td-p/510638





Wednesday, July 14, 2010

small issues great impact---My basic learnings Blackberry

In developing a blackberry app we frequently go trough Paint,PreferredWidth (),etc...

#1)In a Manager or a Field there will be a default Height and width.This is obtained by using getPreferredWidth().If the height or width exceeds the preferred width then the width and height is obtained by using getHeight() and getWidth().So,if you want to use the width of a Field then it is better to go for

Math.max(field.getPreferredWidth(),field.getWidth());


#2)In paint method,
If you want to draw a background type of thing,do required coding before Super.Paint(graphics),else if you want to draw a text type of thing do required type coding after Super.Paint(graphics).Super.Paint(graphics) will do the required painting defined in code(ex. for a horizontalFieldManager it will add the fields which are written in respective code.).

#3[14/07/10])If you are a Blackberry developer running and debugging costs you a lot.Better go for 8320 simulator running.it will take very less time when compared to other simulators.9700 takes a lot of time to load but the advantage is load once use number of times.unlike other simulators 9700 doesn't ask for restart if you delete the app(unless if there is an exception that too in some exceptions only).9700 is based on 5.0 JDE.when coming to 9000 simulator it allows deletion for one time.After second time deletion of same cod file it asks for restart.


Friday, July 9, 2010

online vedio streaming in Blackberry .

I'm trying to stream the video from internet directly.I tried it hardly in my application....the code is...
       
//BB Code
private void startPlayingVideo2(){
  try
  {
  Class playerDemoClass = Class.forName("VideoScreen");

  _player = javax.microedition.media.Manager.createPlayer("rtsp://stream.zoovision.com/Movies/vader_sessions.3gp");
 
  // Realize Player
  _player.realize();

  
  _player.addPlayerListener(this); // Add listener to catch Player events
  _player.setMediaTime(100000);
  
   _videoControl = (VideoControl) _player.getControl("VideoControl"); // Get the Player VideoControl

  // Initialize video display mode
  _videoField = (Field) _videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");

  // Set the video display size to 200 x 200

  // Create a manager for the video field
  _videoManager = new VideoManager();
  _videoManager.add(_videoField);
  add(_videoManager);

  // Set video control to visible
  _videoControl.setVisible(true);

  
  _player.prefetch(); //player has to prefetch before it is getting started
  _player.start();  // Start the Player

  // Set up Player volume
  setVolume(_currentVolume);
  }
  catch (Exception e)
  {
 
  }
}    


Connections should be fast for live straming.

I checked in device as well as simulator.It worked fine for me.9000 simulator only supported for online streaming and i checked in 8220 device also.
Youtube Videos from m.youtube.com didn't worked for me.Some links worked for me are

static video:
rtsp://stream.zoovision.com/Movies/vader_sessions.3gp

for live videostream:
rtsp://stream.zoovision.com/live.sdp

For live audio stream:


Have a nice day.....

Wednesday, July 7, 2010

OCAP,OCAPRI,Tru2Way,MHP,ETV,Java TV,CDC


OCAP
is a specification developed by cablelabs and public facing brand name is Tru2way.Before going to Tru2 way i have to discuss on MHP(Multimedia Home Platform).

MHP is a specification developed by DVB(digital video broadcasting) which is extensively used in Europe and some parts of Asia.The first origin for Tv applications is started by DVB.The Television that support these applications is known as interactive Television.These Applications are supported by Digital TV's(which implements digital signaling).

The applications developed are installed on set-top boxes.The set-top boxes of north america are different from rest of the world.Cable Labs started working on Interactive applications(Firstly started by DVB) which gave rise to OCAP(OpenCable Application Platform ).This spec is branded as Tru2Way.

OCAP can be shown as a stack for easy view.


Applications

----------------------------

OCAP API


JavaTv JFM MHP


CDC/FP/PBP

-------------------------------------

JVM



By now we can get an idea from the application perspective that OCAP is a collection of API's.

OCAP is based on MHP.It uses some of the elements in MHP.The first OCAP Spec is based on MHP version 1.0.0.Later on DVB released another specification Called Globally Executable MHP(GEM) to make it easier to use elements of MHP by other specifications.Later on OCAP is based on GEM.

Java TV describes set of concepts required for Dtv such as acessing serviece information,selecting new services and loading files form corousel.It is done in way that it is not tied to Dtv standards.JavaTv describes many of the concepts required for DTv platform.there are some elements missing.So,JavaTv is more a component rather than a middle ware software itself.OCAP uses JavaTv concepts for accessing service information,selecting new services and loading files form corousel etc.

JFM(Java Media Framework) ,an API for rendering Video and other Media.

CDC(Connected Device Configuration) It forms the base of a Java technology stack. It is intended for devices such as television set-top boxes, automobile computers, and other midsized computers.

FP(Foundation Profile) and Personal Basis Profile (PBP) round out CDC with additional APIs, including APIs for user interface and graphics.

OCAP RI(OpenCable Application Platform Reference Implementation) is the implementation for OCAP.The applications can be developed using OCAPRI.

In order to start with OCAP we have to go through some of technical terms.


  • Bound application: An application that is tied to a service in order to operate. When the user selects another service, then (in most cases) the application is terminated.
  • Unbound application: An application that is not tied to a specific channel and can run independent of any service. Unlike bound applications, an unbound application continues to run after the user navigates to other services.
  • MPEG-2 transport stream: The binary stream of data that delivers the audio, video, and interactive content to Tru2way-enabled devices (TVs, set-top boxes, and so on). The transport stream originates from the cable operator and terminates at the cable installation.
  • Return channel: A separate bidirectional data connection between the Tru2way-enabled device and the cable operator. All Tru2way-enabled devices include a cable modem that enables the device to have a high-bandwidth connection back to the cable operator.
  • Service: Conceptually, a service is a TV channel. However, a service is actually an integrated collection of audio, video, and program data that's presented together.

The main feature of these apps are two way communication between User and cable operator.

ETV is another specification in TV app dev.It aims at maximum set-top boxes.

The main differences between Tru2Way and Etv are
ETv applications are supported by legacy set-top boxes,where as Tru2Way applications don't.But the present Set-top boxes support Tru2Way apps and Etv applications may not provide user interactivity.
Tru2Way is having Superset functionality of Etv.So,the applications which are developed in Etv can be completely developed using Tru2Way.
For Bound applications Etv is best and for Unbound Applications tru2way is best.

Both have common "Write once deploy any where" concept.

ATSC have recently announced the Advanced Common Application Platform (ACAP). This is supposed to be a common basis for all interactive TV systems in the US, be they cable, satellite or terrestrial. This is also based on GEM, and adds some elements from OCAP that are appropriate for the US market.

Here are some references:

http://developers.sun.com/mobility/ocap/articles/intro/

http://www.interactivetvweb.org/tutorials/javatv

http://www.ibm.com/developerworks/java/library/j-ocap1/index.html?ca=drs-

http://www.ibm.com/developerworks/java/library/j-ocap3/index.html?ca=drs-

http://www.ibm.com/developerworks/java/library/j-ocap2/index.html?ca=drs-

Friday, June 25, 2010

Iphone 4...yet another revolutionary product



From past 4 years a new surprise form Apple every year.The revolutionary product which changed the world of smart phones.The most recent is Iphone 4....A lots of features added to the Previous version.Starting with the deign...longer battery,new A4 chip,Retina Display,5Mp cam with LED flash,high res video capturing,Multitasking,Video calling(Face Time),Screen resolution..........Thinner ans yet smarter than previous ones.
The first Day of bookings over 600,000 iphones were ordered according to the apple.

Design & Battery--->
Iphone 4 delivers nearly 16% more than previous iphone.This is possible with the increase in size of battery.But the size of iphone is the same and thinner.So how it is possible?.The answer is the processor(A4) Size is reduced and increased Battery size and thus battery capacity. The crve of previous iphones id replaced with rectangular design.


Talk time:
Up to 7 hours on 3G
Up to 14 hours on 2G

Standby time:
Up to 300 hours

Internet use:
Up to 6 hours on 3G
Up to 10 hours on Wi-Fi

Video playback:
Up to 10 hours

Audio playback:
Up to 40 hours

Retina Display---->
The display is amazing.The screen resolution is 960 X640.You will feel like as you are printing the paper written by you.The screen Glass is on front and back which is very hard and finger print resistant.The technology used in making the glass is based on high speed train front glasses.

5Mp cam--->
The Cam comes with a LED flash and 5mp .We can get high def video recordings.
There is also a front Cam.

Multitasking--->
The one which is missing in all previous iphones.


Face Time(Video Calling)--->
Video calling is already present in some of other smart phones.But what makes difference is the quality of Call is completely dominating than other phones.The Camera can switch from front and back cameras with a single TAP.

The other features include ...folder creation,App Store(nearly 1,50,00 apps)...etc...


Some of the Drawbacks are fixed battery.We cant change the Battery.Some users use two batteries .they will definitely face the problem.In built memory card.There is no option to take the memory card out of the phone.

Iphone 4 comes with two variants....16gb and 32 gb .
16Gb costs around 199$ , a contract with AT&T network.
32Gb costs around 299$ , a contract with AT&T network.


For more details visit

http://www.apple.com/iphone/


14/07/10......

Many issues are raising on the signal strengths of iphone.The signal level decresases when the hand position is on he left bottom side at a particular point.Apple team have to respond to this ASAP.

J2Me...My first App

My first App ....Mobile App...i have to do it on J2ME platform.I developed a J2ME application at last with the help of 3rd party LWUIT.The tool LWUIT is very flexible to use.But the performance degrades compared to pure J2ME app.The issue we struggled is displaying the large text.We are getting the whole text in a single line(cutting the text which is more than screen size.).We wrote a function to wrap the text into pieces sufficient for the screen and display each piece in a separate label.But this will take lot of time if the text is too large.....

Compared to BB and Iphone J2ME api doesn't have a rich look and feel.The network connectivity is good in iphone.

Small phones always support J2ME.Nokia and sony erricson mobiles also suport J2ME.

Wednesday, June 23, 2010

tru2way---rare Tv app dev

Had to do some R&D on TV applications a long ago.I finally concentrated on Tru2Way technology which is emerging,Brand name for opencable specifications.OpenCable is a set of hardware and software specifications under development in the United States by CableLabs to "define the next-generation digital consumer device" for the cable television industry.Tru2Way is developed by Cable labs.

Previously there is another technology called MHP(multimedia home platform) which is a decent success in UK.Then an Us company CableLabs started working on this Stream ..finally it is Tru2Way.The set top boxes in Us are bit different from rest of the world.Tru2Way is spreading among US.
Comming to the technology...what is this technology?why we are using this technology?what are the other technologies in this category?...these are some of the questions raised.....

Basically for a TV application the user cant interact with the cable operator ie there is no 2 way communication.But the applications which are developed by Tru2Way can have an interaction with the cable operator....confined by the application.Suppose a reality show is going on.You have to poll the contestant through SMS,but by using this technology we can directly poll to a contestant through remote.this is a sample application.we can develop a lot more.

This field has to be improved a lot.As far as i observed we are not able to input the characters i.e the user can only generate events.

The apps devoloped on this technology are installed on the Set Top Boxes.It uses java Tv API for network issues.

If you are interested in this technology first thing is to visit http://www.java.net and where you can find forums....for a lot more discussion.


some of the useful links are:

http://www.ibm.com/developerworks/java/library/j-ocap1/index.html?ca=drs

http://www.ibm.com/developerworks/java/library/j-ocap2/index.html?ca=drs

http://www.ibm.com/developerworks/java/library/j-ocap3/index.html?ca=drs





Blackberry App dev into my life

After a lots of confusion in my life...I am into Blackberry app development.


First of all the Mobile applications need a lot of patience to develop.We have to use less resources not like the web apps or Java apps.It is based on Java (J2Me).RIM modified the J2me API into the way Blackberry supports.BB apps are COD files(which cant be extracted) not like JAR files of J2ME.J2me apps are also supported by Blackberry.But these(J2ME) Apps will not be approved by Blackberry app store team.

I worked on J2ME for 2 months and then suddenly shifted to Blackberry dev as per requirement.My first task i remember i have to support arabic text in my app.its a simple thing,the one that challenged me is to retrieve an arabic text from editField.I struggled a lot...and At last i got soln to store the value in RMS and retrieve the value from RMS.These are some of my first experiences on BB app dev.

On the flip side,The debugging and running are too slow in BB.An app developer should have a lot of patience.

Introduction.....Ends here.