Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
yosoh
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified
Accepted Solution

question regarding BB article DB-00570

Hi,

 

I have a question related to Article Number: DB-00570

 

In this article I changed "BrowserConfig" to "IPPP"


ServiceRecord[] records = sb.findRecordsByCid("IPPP");

 

 

the utility methods throw a null pointer exception. Also, what does the number "4" mean in the following method:

 

private String getTransportUID(ServiceRecord record)

{
return getDataString(record, 4);
}

 

What I want to do is read the Transport UID (The one which start with S ...) of all the records in the service book. Please guide me if there is a better way to do this. The same thing also happens to CMIME records.

 

thanks in advance,

 

yosoh.

--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Please use plain text.
Administrator
MSohm
Posts: 14,362
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: question regarding BB article DB-00570

That method is returning the field of "type" 4, which maps to the transport UID in the byte array returned from record.getApplicationData(). 

 

The ServiceRecord.getUID method should return the value you are looking for as a String.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
yosoh
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified

Re: question regarding BB article DB-00570

Thanks Mark, that worked !!

 

regards, 

 

yosoh. 

--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Please use plain text.