BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-20-2005, 12:29 PM   #1
berryinnovative
New Member
 
Join Date: Jul 2005
Model: 7100t
Posts: 6
Default Device Code

Please Login to Remove!

Does anyone know how to obtain the device code for a Blackberry handheld? I do not mean the PIN returned by DeviceInfo.getDeviceId().

The device code I am referring to is used in the EventInjector.Event constructor (a protected constructor, not covered in the API docs).
Offline  
Old 07-20-2005, 03:57 PM   #2
corey@12mile
BlackBerry Extraordinaire
 
Join Date: Dec 2004
Location: in a house...
Model: lots
Carrier: Rogers
Posts: 1,148
Default

Wow... I don't quite understand what "device code" is... would DeviceInfo.getDeviceName be what you want? ie. what model is the device?

I don't know what isn't documented... EventInjector is extended from Object, which is fully documented, and then the additional properties for EventInjector are documented as well...

Maybe you can explain a little more about what you want to do...

cd.
Offline  
Old 07-20-2005, 04:25 PM   #3
berryinnovative
New Member
 
Join Date: Jul 2005
Model: 7100t
Posts: 6
Default More info on device code

OK, here is a brief explanation of what I am trying to do. I want to inject an event into the system with EventInjector.invokeEvent(). That call needs an object that is derived from EventInjector.Event. I do not, however, want this to be a Trackwheel or Key event.

So, I have a class that derives from EventInjector.Event. On my first compile after deriving, I got the message that I had not called the superclass constructor which looks like this: super(int, int, int, int, int, Object, Object).
After making the debugger stop at various points and passing arguments in different orders, I determined that the superclass constructor would look like this (if it were documented):

EventInjector.Event(int deviceCode, int eventId, int submessage, int data0, int data1, Object object0, Object object1);

This looked familiar to me as the last four parameters are what ApplicationManager.postGlobalEvent() uses in certain of its forms. After playing with the debugger some more, I was able to determine that the simulator seems to pass 0x23 as the device code all the time. I do not think I can count on this on a real device, however, and thus the question as to where to get the device code for the handheld.

I suspect I might be able to get ApplicationManager.postGlobalEvent() to do this for me, but I cannot seem to find the right GUID value to pass.
Offline  
Old 07-30-2005, 01:00 PM   #4
berryinnovative
New Member
 
Join Date: Jul 2005
Model: 7100t
Posts: 6
Default

Does anybody have anything to offer on this issue? I would really appreciate the help.
Offline  
Old 08-17-2005, 02:34 PM   #5
berryinnovative
New Member
 
Join Date: Jul 2005
Model: 7100t
Posts: 6
Default Device Code

OK, I think I have it figured out. RIM seems to have code names for their platforms/devices. The code I found (35 in decimal, 23 in hex) corresponds to RIMPOLARBEAR2. I still do not know how this code maps to actual devices, though. Any help on this would be appreciated.
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


Genuine OEM IBM Selectric Tilt Pulley Bellcrank 1174427 Brand New Sealed Package picture

Genuine OEM IBM Selectric Tilt Pulley Bellcrank 1174427 Brand New Sealed Package

$29.95



IBM Wheelwriter Universal Power Supply P/N 1434518 Series II Typewriter OEM picture

IBM Wheelwriter Universal Power Supply P/N 1434518 Series II Typewriter OEM

$59.99



DATALOGIC ADC GRYPHON GD4410 2D IMAGER IBM46XX/OEM USB/RS-232 MULTI-INTERFACE picture

DATALOGIC ADC GRYPHON GD4410 2D IMAGER IBM46XX/OEM USB/RS-232 MULTI-INTERFACE

$187.99



GENUINE IBM 28P2009 BLACK TONER CARTRIDGE FOR INFOPRINT 1130 1140 OEM picture

GENUINE IBM 28P2009 BLACK TONER CARTRIDGE FOR INFOPRINT 1130 1140 OEM

$54.99



 IBM  Lexmark 1337765 Easystrike Lift Off Correction Tape NEW NOS Typewriter OEM picture

IBM Lexmark 1337765 Easystrike Lift Off Correction Tape NEW NOS Typewriter OEM

$4.00



NEW IBM 46X1246 Burndy 7-Pin Industrial Cable Assembly Type 2851 TYCO OEM picture

NEW IBM 46X1246 Burndy 7-Pin Industrial Cable Assembly Type 2851 TYCO OEM

$76.55







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