bluetooth app closing unexpectedly

bluetooth app closing unexpectedly

BY 24 Jul 2013 Native Application Development

hi 

i want to transfer a file via bluetooth so i am using bluetooth opp client here is my code

 

BluetoothManager btManager;
// The application must implement the IBluetoothManagerEventListener interface
btManager.Construct(*this);
BluetoothOppClient oppClient;
 
// The application must implement the IBluetoothOppClientEventListener interface
oppClient.Construct(*this);
  //pairing
  IList* pPairedDeviceList = btManager.GetPairedDeviceListN();
  // Get the paired device element at the index 0
  BluetoothDevice* pPairedDevice = (BluetoothDevice*)pPairedDeviceList->GetAt(0);
 
  // Get information from the paired device
  String pairedDeviceName = pPairedDevice->GetName();
  AppLog(“%ls”,pairedDeviceName.GetPointer());
  String filePath =String(Tizen::App::App::GetInstance()->GetAppRootPath() + L”data/text1.dat”);
AppLog(“%ls”,filePath.GetPointer());
     result r=oppClient.PushFile(*pPairedDevice, filePath);
      AppLogException(“exception [%s]”, GetErrorMessage(r));
 
it is showing the paired devices correctly while transfering file the exception is E_SUCCESS but the problem is the application is closing unexpectedly ….and i am not able to send files.
 
suppose if i try to give path as String filePath =L”opt/media/Images/image1.jpg” the pushFile function giving the exception “E_FAILURE”..please kindly help me in identifying wher the problem is????
 
i have included bluetooth.admin and bluetooth.opp previliges and also network.bluetooth feature
 
 
 

 

Written by