Pages

Sunday 11 December 2011

Make a Call in ANDROID

Here I am gonna share the make a call in android.Well i have assumed that you know some basics in android.

1Step: Give  the user permission in Manifest.xml
<user-permissions android:name="android.permission.CALL_PHONE"/>
2 Step: In your activity on create method create an instance for intent with the action of call.then parse your URI with the phone number. then start your activity. Here the code comes.

Intent intent=new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:999999999"));
startActivity(intent);

Tuesday 15 November 2011

Blackberry conversion form jad file


Conversion jad to Cod file
I have got chance to work in the J2ME application. My work was to convert that application to blackberry application format. I have searched for that in many websites. But I found only few solution related to that. The solution which I got in the website was not working. Then I finally found one solution, very rare it is. I want to share it here. It will be useful at least for one person.
The following are the steps to be followed to convert the jad file of J2ME to cod file of  J2ME application which is for the blackberry in windows
1.         Download the Blackberry JDE.
2.         Install the blackberry JDE.exe (check for the folder C: program files->research in motion->blackeberry(version))
3.         Copy the J2ME jar and jad in Blackberry_projectname  folder and save it in any drive or desktop.
4.         Open JDE of blackberry . Click start --> All programs --> Research In Motion --> JDE
5.         Now Blackberry JDE is opened. click File --> New --> You will be having 3 tabs (Files , Projects , Work space) --> Workspace
6.         click browse and choose the location of Blackberry_projectName.
7.         Give the workspace name as projectname and click ok.
8.         So now projectname.jdw has generated. Right click on that projectname.jdw-> create new project in projectname .Choose the project name as projectname and click ok.
9.         Right click on the projectname-> propreties (You will be having 5 tabs General, Application,Resources, Compile ,Build) ->Application .
10.       Choose project type as MIDlet and projectname for the Name of the main MIDlet class .
11.       Right click on the projectname and build project
12.       projectname.cod will be there in the location of Blackberry_projectname.The another method to follow the conversion of jad file to cod file.
1.      So now you will have blackberry JDE in your system.
2.      Open the command prompt.
3.      Choose the path  as C:Program files/research In Motion/BlackBerry JDE 4.2.1/bin.
4.      Copy your jad file and jar file and paste it in the Program files/research In Motion/BlackBerry JDE 4.2.1/bin.
5.      Then give the command as rapc import= “C:Program Files/Research In Motion/Blackberry JDE 4.2.1/lib/net_rim_api.jar” codename=midletname-midlet jad=J2MEjadfilename.jad  J2MEjarfilename.jar
6.      Now the cod file will be generated in the Program files/research In Motion/BlackBerry JDE 4.2.1/bin path

                


Format your code


Well this will tell you to format the program automatically. As a developer everyone should follow the code with the neat format. Or else it won’t be nice to view. As a beginner I didn’t know this shortcut to format. Later I found the shortcut and method to format automatically for the program. I just want to share it here. It’s mainly for beginners .
Shorcut Way :
Press ESC in keyboard. On the right side of your monitor you can The option of Format .  Then press Enter . Its the shortcut. If you cant able to find Format  options on the right side then go for the following method.
Windows-> preferences -> Java (left side)->Editor ->Save action->perform the selected options on save (Tick the check box)->Format Source code (Tick the check box) -> Format all lines (Tick the check box)
Click apply and Ok.
Now your code will be formatted automatically. You can get the neat format of your codeJ

Wednesday 14 September 2011

September 15 2011 (9:44am)

Hiii
  As like others I also wanted to create my own blog and wanted to share the things that I have known and experienced.Sometimes I doubt on myself that am I capable? Sometimes I will think Who will read if I write blog? and most of the times I will think that On what I should write? This s my first blog..From the heading itself you can find that when did I start blogging. Lets see how long it goes :)