2013-11-21 3 views
2

Простой вопрос для каждого, есть ли какой-либо возможный способ получить Blackberry BBM Logs в приложении, через Программирование.Получить BBM чат-журналы

После задачи я сделал: -

  1. Скачать & интеграции BBM SDK в проекте.
  2. Следуйте за BBM Development Guide.

Вот мой код: -

public void getBBM_Logs() 
    { 
     BBMPlatformContext platformContext =null; 
     try 
     { 
      platformContext = BBMPlatformManager.register(new MyBBMAppPlugin()); 


      if(platformContext != null) 
      { 
       ContactListService contactListService = platformContext.getContactListService(); 
       BBMPlatformContactList contacts = contactListService.getContactList(); 
       Enumeration contactsEnum = contacts.getAll(); 

       while(contactsEnum.hasMoreElements()) 
       { 
        BBMPlatformContact contact = (BBMPlatformContact)contactsEnum.nextElement(); 

        add(new LabelField(contact.getDisplayName())); 
       } 

      } 

     } 
     catch (ControlledAccessException e) 
     { 
      // The BBM platform has been disabled 
     } 


     if (platformContext != null) 
     { 
      MyBBMPlatformContextListener platformContextListener; 
      platformContextListener = new MyBBMPlatformContextListener(); 
      platformContext.setListener(platformContextListener); 
     } 

    } 


    private class MyBBMPlatformContextListener extends BBMPlatformContextListener 
    { 
     public void accessChanged(boolean isAccessAllowed, int accessErrorCode) 
     { 
      if (!isAccessAllowed) 
      { 
       // You cannot access the BBM platform 
      } 
     } 

     public void appInvoked(int reason, Object param) 
     { 
      // Code for handling different contexts for invocation 
     } 
    } 

    private class MyBBMAppPlugin extends BBMPlatformApplication 
    { 
     public MyBBMAppPlugin() 
     { 
      super("57888721-1e52-4171-a8a4-0559eab8efdf"); 
     } 
    } 

Пожалуйста, дайте мне знать, есть ли возможный способ получить ChatLogs.

ответ

1

Извините, что это невозможно - так как я думаю, что BB рассматривает доступ к журналам чата из программы как потенциальную угрозу безопасности.

+0

..thanks Man !! –

 Смежные вопросы

  • Нет связанных вопросов^_^