Hey everyone
In my app i have 2 views and in the second i am using Toybox.Communications .
On the device when i want to go back from the second view to the first view it crashes.
I have noticed that if i comment out this function: Comm.setMailboxListener() from in the second view it doesn't crash anymore.
I believe it's an object that i need to release before leaving the second view i just dont know how and what.
This is the code from the second view:
function initialize()
{
Comm.setMailboxListener( method(:onMail) );
}
//from class that extends Ui.BehaviorDelegate :
function onBack()
{
if( ( session != null ) && session.isRecording() )
{
session.stop();
relatedView.discardRecording();
}
var firstView = new FirstView();
Ui.switchToView(splashView, new FirstViewDelegate(firstView), Ui.SLIDE_IMMEDIATE);
return true;
}
I would appreciate any help,
Thank you!