BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-15-2006, 06:07 AM   #1
ujbandara
Thumbs Must Hurt
 
ujbandara's Avatar
 
Join Date: Aug 2005
Location: Upul Bandara from Colombo Sri Lanka -----------------------------
Model: 7290
Carrier: Dialog
Posts: 153
Question Extract BB device PIN using Midlet…….. ?

Please Login to Remove!

Hi,

Is it possible to Extract BB device pin No via midlet.

(I am using Netbeans to develop mildlet for BB device)
__________________
Did you ever compare Affrican Elephants and Sri Lankan Elephants?
Where are classic Elephants?

Upul
Offline  
Old 08-15-2006, 07:22 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

DeviceInfo.getDeviceId() gives you the BB-Pin
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-15-2006, 08:14 AM   #3
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

is deviceinfo part of the microedition api or is it a rim api?
Offline  
Old 08-15-2006, 10:21 AM   #4
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

can't find it in the api right now but i would guess that it's rim as other devices do not have a PIN...
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-15-2006, 11:11 PM   #5
youpul
New Member
 
Join Date: Sep 2005
Model: 7290
Posts: 13
Default

hi,

where is "DeviceInfo.getDeviceId() " method?
how do i import those methods/ apis?
Offline  
Old 08-16-2006, 04:23 AM   #6
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

net.rim.device.api.system.DeviceInfo

if you work with the RIM JDE or integrate it into another JDE you can access those classes. The JDE can be downloaded free of charge at RIMs website
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-17-2006, 04:26 AM   #7
ujbandara
Thumbs Must Hurt
 
ujbandara's Avatar
 
Join Date: Aug 2005
Location: Upul Bandara from Colombo Sri Lanka -----------------------------
Model: 7290
Carrier: Dialog
Posts: 153
Default

What is best way to integrate JDE with Netbeans editor?
__________________
Did you ever compare Affrican Elephants and Sri Lankan Elephants?
Where are classic Elephants?

Upul
Offline  
Old 08-17-2006, 04:43 AM   #8
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

Quote:
Originally Posted by ujbandara
What is best way to integrate JDE with Netbeans editor?
that i can help you with, i blogged a guide for doing this, unfortunately i forgot to pay my bill this month (again) so the site is down, use the google cache: MeshTech News - and scroll down to the relevant article. i've quoted the text below:

Step1 - download and install Netbeans (this tutorial was done using the preview of netbeans 5.5)

Step2 - download and install Netbeans Mobility Pack

Step3 - download and install blackberry jde 4.1

Step4 - Launch Netbeans, from the toolbar select tools > java platform manager > add platform and select 'custom java micro edition platform emulator' - View image

Step5 - Enter (or paste) 'C:\Program Files\Research In Motion\BlackBerry JDE 4.1.0' as the Platform Home, then add 'Platform Name' and 'Device Name' - View image

Step6 - Select 'Next', From the 'Bootstrap Libraries' list, remove every item except 'net_rim_api.jar' - View image

Step7 - Select 'Next', Ignore the 'Sources' pane but add the path to the Blackberry javadocs: 'C:\Program Files\Research In Motion\BlackBerry JDE 4.1.0\docs\api\' then click 'finish' - View image

Step8 - Restart Netbeans

Step9 - Create a new project by selecting 'mobile application' from the 'mobile category' - - View image. for this tutorial the application is called 'bb_test', uncheck the 'Create Hello Midlet' option - View image

Step10 - Select the Blackberry platform that you created in steps 1 to 8 - View image

Step11 - Add this xml data to the build.xml file which is visible if you select the 'Files' pane - View image

Step12 - Next you need to create an .alx file which is a Blackberry 'Application Loader' xml file, in the 'Files' pane, right-click and select 'new' > 'empty file' - View image
Name the file the same as your application - View image - and add this xml data

Step13 - You're now ready to start writing your application, switch back to the 'Project' pane and create a new java source file - View image

Here's a simple small application to get you started:

//start import net.rim.device.api.ui.component.*; import net.rim.device.api.ui.container.*; import net.rim.device.api.ui.*;

class myApp extends UiApplication {
public static void main(String[] args){
myApp instance = new myApp();
instance.enterEventDispatcher();
}

public myApp(){
pushScreen(new myScreen());
}
}

class myScreen extends MainScreen{
BasicEditField queryField = new BasicEditField("Query: ", "");
ButtonField submitButton = new ButtonField("Submit", ButtonField.CONSUME_CLICK);

public myScreen(){
add(queryField);
add(submitButton);
}
}
//eof

If you click on the 'File' pane your directory structure should look similar to this image - View image

Step14 - Netbeans still expects your project to be a standard midlet based application, we have to cheat slightly and enter the name of our main class as the midlet name (the class that will extend UIApplication), right-click on your project and select properties, select 'MIDlets' > 'Add' - View image - There will be a warning message, ignore it - View image

Step15 - All being well you should now be able to write, compile and run your native blackberry application and test in the emulator all from netbeans - View image

[NOTE] - the text you need to add inside the </project> tag of the buildxml file is:

<property name="rim.blackberry.home" location="C:\Program Files\Research In Motion\BlackBerry JDE 4.1.0"/>
<property name="rim.blackberry.emulator" value="8707v"/>

<target name="post-jar">
<exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows XP" dir="${dist.dir}" executable="${rim.blackberry.home}/bin/rapc.exe" failonerror="true" resolveExecutable="true">
<arg value="import=${rim.blackberry.home}/lib/net_rim_api.jar"/>
<arg value="codename=${name}"/>
<arg value="${dist.jad}"/>
<arg value="${dist.jar}"/>
</exec>
<copy file="${name}.alx" todir="${dist.dir}"/>
</target>

<target name="run" depends="init,jar">
<copy todir="C:\Program Files\Research In Motion\BlackBerry Device Simulators 4.1.0\Device Simulators 4.1.0.316" verbose="true">
<fileset dir="${dist.dir}">
<include name="**/${name}.*"/>
</fileset>
</copy>
<exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows XP" dir="C:\Program Files\Research In Motion\BlackBerry Device Simulators 4.1.0\Device Simulators 4.1.0.316" executable="C:\Program Files\Research In Motion\BlackBerry Device Simulators 4.1.0\Device Simulators 4.1.0.316/${rim.blackberry.emulator}.bat" failonerror="true" resolveExecutable="true"/>
</target>

<target name="debug" depends="init,jar">
<copy todir="C:\Program Files\Research In Motion\BlackBerry Device Simulators 4.1.0\Device Simulators 4.1.0.316" verbose="true">
<fileset dir="${dist.dir}">
<include name="**/${name}.*"/>
</fileset>
</copy>
<delete file="${preprocessed.dir}/.timestamp"/>
<parallel>
<property name="jpda.port" value="8000"/>
<java jar="${rim.blackberry.home}/bin/JDWP.jar" fork="true" dir="${rim.blackberry.home}/bin">
<jvmarg value="-Xmx128M"/>
</java>
<sequential>
<sleep seconds="5"/>
<antcall target="nbdebug"/>
</sequential>
</parallel>
</target>

<target name="post-clean">
<echo>Post clean</echo>
<delete>
<fileset dir="C:\Program Files\Research In Motion\BlackBerry Device Simulators 4.1.0\Device Simulators 4.1.0.316">
<include name="**/${name}.*"/>
</fileset>
</delete>
</target>
Offline  
Old 08-18-2006, 12:41 AM   #9
ujbandara
Thumbs Must Hurt
 
ujbandara's Avatar
 
Join Date: Aug 2005
Location: Upul Bandara from Colombo Sri Lanka -----------------------------
Model: 7290
Carrier: Dialog
Posts: 153
Default

Thanks...

Step 11 is ok.

If possible Please let us know futher info on Step12
What kind of XML data to be add to that alx file?
__________________
Did you ever compare Affrican Elephants and Sri Lankan Elephants?
Where are classic Elephants?

Upul
Offline  
Old 11-09-2006, 04:26 AM   #10
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

just found this following a link in another thread, here's the text you need to add to the .alx file missing from the above guide, added for completeness:

<loader version="1.0">
<application id="myApp">
<name >
</name>

<description >
</description>

<version >
</version>

<vendor >
MyCompany
</vendor>

<copyright >
Copyright (c) 2006 MyCompany
</copyright>

<fileset Java="1.5">
<directory >
MyCompany
</directory>

<files >
myApp.cod
</files>
</fileset>

</application>

</loader>
Offline  
Old 11-09-2006, 04:30 AM   #11
dollars5
Talking BlackBerry Encyclopedia
 
Join Date: Nov 2006
Model: 8100
Carrier: Airtel
Posts: 335
Default

Ahhh, I was just copying my alx file to give him - jfisher has been fast there. There is a detailed tutorial on this on Blackberry Development Using NetBeans Mobility but the Fooling the Netbeans to make it believe that the app is a midlet is contribution of Jfisher. Thanks.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


NOS Vintage ROLODEX Electronic POCKET Directory NAMES Numbers COVER Sealed 1993 picture

NOS Vintage ROLODEX Electronic POCKET Directory NAMES Numbers COVER Sealed 1993

$9.77



Beautiful Leather Journal - Vintage Brown picture

Beautiful Leather Journal - Vintage Brown

$10.20



Vintage Starrett Depth Micrometer 440 Set in Original Box picture

Vintage Starrett Depth Micrometer 440 Set in Original Box

$45.00



Vintage SENCORE FE27 “Big Henry” Field Effect Multimeter picture

Vintage SENCORE FE27 “Big Henry” Field Effect Multimeter

$14.95



Vintage Journal 220 Antique Paper 7 X 5 inches Leather Bound Handmade Diary picture

Vintage Journal 220 Antique Paper 7 X 5 inches Leather Bound Handmade Diary

$19.79



Flat File Vintage Large Brown Wooden Drafting Cabinet picture

Flat File Vintage Large Brown Wooden Drafting Cabinet

$250.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.