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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums on April 1st. BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

New Developer
New Developer
Posts: 22
Registered: ‎08-17-2009
My Device: Not Specified

How to create add-in in device manager

I am trying to create a simple sync app to interface the syncdemo


Referring to this 



Created a VB.NET class library project and added a class DataSync.v. In the project property compile option checked 'Register for com interop'


The desktop manager doesn't show the plugin.  Infact I don't see it the regeditor as decribed in the link above.


Could someone help me with this.


  • For creating a desktop sync app, do I must need to use the desktop manager
  • If yes, how do I make a MSI installer etc. that could register the plug-in the desktop manager. 
  • Do I need to create a seperate application to edit the data file (contact.xml), or can create an interface in the project etc
  • If the desktop manager is running and auto sync is on, If the contact.xml edited by a seperate app, will it straightaway update the connected BB  syncdemo data.
  • Would be great if someone could share a sync desktop app in .NET


Thanks in advance.


Here is the  DataSync code.



Class DataSync
    Implements IRimExtension

    Public Sub Configure(ByVal pRimUtility As DESKTOPAPILib.IRimUtility, ByVal hWnd As Integer) Implements IRimExtension.Configure
        '*** You can add code here if you want your user to display
        '*** a screen allowingusers to configure any parameters
    End Sub

    Sub GetErrorString(ByVal errorCode As Integer, ByRef errorMsg As String) Implements IRimExtension.GetErrorString
        MsgBox("Encountered a problem during synchronization", vbCritical, "SyncSample Data Synchronization")
    End Sub

    Sub GetExtensionInfo(ByRef extensionInfo As String) Implements IRimExtension.GetExtensionInfo
        extensionInfo = "<?xml version=""1.0"" encoding=""UTF-8"" ?><extensioninfo version=""1.0.0"">" & _
         vbCrLf & "<vendorname>Your company here</vendorname>" & _
    vbCrLf & "<vendorversion>1.0</vendorversion>" & _
    vbCrLf & "<path>G:\\SyncDemo\\SyncDemo\\SyncDemo\\bin\\Debug</path>" & _
    vbCrLf & "<description>Sample addin using VB 6.0" & _
    "</description><displayname>Sample addin using VB 6.0</displayname><clsid>{7BC5A21E-D252-4F36-9591-9656D3C76415}" & _
    End Sub

    Sub Process(ByVal pRimUtility As DESKTOPAPILib.IRimUtility, ByVal pRimDeviceAccess As DESKTOPAPILib.IRimDatabaseAccess) Implements IRimExtension.Process

        Dim oTemp As Object
        Dim oProgress As DESKTOPAPILib.IRimProgress
        Dim oTables As DESKTOPAPILib.IRimTables
        Dim oTable As DESKTOPAPILib.IRimTable
        Dim oContact As DESKTOPAPILib.IRimTable
        Dim oRecords As DESKTOPAPILib.IRimRecords
        Dim oRecord As DESKTOPAPILib.IRimRecord
        Dim oFields As DESKTOPAPILib.IRimFields
        Dim oField As DESKTOPAPILib.IRimField
        Dim oXML As Xml.XmlDocument
        Dim oNodes As Xml.XmlNodeList
        Dim oNode As Xml.XmlNode
        Dim sPath As String
        Dim l As Long
        Dim lHigh As Long
        Const FIELDTAG_FIRSTNAME = 1
        Const FIELDTAG_LASTNAME = 2
        Const FIELDTAG_EMAIL = 3

        On Error GoTo ErrorHandler
        oXML = New Xml.XmlDocument

        oXML.Load(Application.StartupPath & "\ContactList.xml")

        oTemp = pRimUtility

        If TypeOf oTemp Is IRimProgress Then
            oProgress = oTemp
        End If

        oProgress.SetProgressDlgText(eRIM_ProgressText.RIM_ProgressText_Title, "Sample Data Syncronization")
        oProgress.SetProgressDlgText(eRIM_ProgressText.RIM_ProgressText_Msg, "Start of data syncronization...")

        If oXML.ChildNodes.Count > 0 Then
            '*** only do the sync if we got valid data
            oTables = pRimDeviceAccess.Tables

            '*** let's get the application table from the device
            For Each oTable In oTables
                If oTable.Name = "Contacts" Then
                    oContact = oTable
                    Exit For
                End If

            If oContact Is Nothing Then
                MsgBox("Could not find the Contact database in the device", vbCritical)
                '*** let's clear the device of existing data

                '*** let's set it up for updating
                oRecords = oContact.LoadRecords(eRIM_Mode.RIM_Mode_ReadWrite)

                oNodes = oXML.SelectNodes("//contact")
                lHigh = oNodes.Count - 1

                If lHigh >= 0 Then
                    l = 0
                    oProgress.Notify(eRIM_Progress.RIM_Progress_Count, lHigh, 1)

                    For Each oNode In oNodes
                        oRecord = oRecords.AddRecord
                        oFields = oRecord.fields

                        If Not oFields Is Nothing Then
                            addField(oFields, FIELDTAG_FIRSTNAME, oNode.ChildNodes(0).InnerText)
                            addField(oFields, FIELDTAG_LASTNAME, oNode.ChildNodes(1).InnerText)
                            addField(oFields, FIELDTAG_EMAIL, oNode.ChildNodes(2).InnerText)
                        End If

                        oField = Nothing
                        oRecord = Nothing
                        l = l + 1
                        oProgress.SetProgressDlgText(eRIM_ProgressText.RIM_ProgressText_Msg, "Uploading " & l & " of " & lHigh)
                        oProgress.Notify(eRIM_Progress.RIM_Progress_Pos, l, 0)

                    oProgress.SetProgressDlgText(eRIM_ProgressText.RIM_ProgressText_Msg, "please wait to wrap up the syncronization...")
                End If
            End If
        End If
        Exit Sub

        MsgBox("Encountered an error during synchronization:" & Err.Number & " " & Err.Description, vbCritical, "Sample Data Synchronization")
    End Sub

    Private Sub addField(ByVal oFields As DESKTOPAPILib.IRimFields, ByVal iFieldId As Integer, ByVal sData As String)
        Dim oField As DESKTOPAPILib.IRimField
        Dim ayWork() As Byte

        sData = sData & Chr(0)
        oField = oFields.AddField
        oField.Id = iFieldId
        ayWork = System.Text.UnicodeEncoding.ASCII.GetBytes(StrConv(sData, VbStrConv.None))
        oField.value = ayWork
    End Sub
End Class





New Developer
New Developer
Posts: 22
Registered: ‎08-17-2009
My Device: Not Specified

Re: How to create add-in in device manager

Smiley Happy Victory. I could see the plug in desktop manager. It seems applicatons in the download folder are not 'installed applications' for BB device emulator.
New Developer
Posts: 1
Registered: ‎11-30-2009
My Device: Not Specified

Re: How to create add-in in device manager



I'm working on a .NET Desktop Manager plugin as well. Do you have some example code you could share? Or a short description of what you did to make DM aware of it? I followed the instructions you linked to, but did not archieve success so far Smiley Sad