You will have to make a custom screen that overrides PopupScreen
for that. In your implementation, you will have to override onUiEngineAttached
, like so -
protected void onUiEngineAttached(boolean attached)
{
super.onUiEngineAttached(attached);
if(attached)
{
// start server hit thread, which closes the screen when done
}
}
After that, just push the screen using UiApplication.getUiApplication.pushModalScreen()
. You will want to keep the data you received in a byte array somewhere in the screen's instance which you can retrieve by calling a getter once the screen has been popped.