how i can serialize Container? (loopback android sdk)

15 views
Skip to first unread message

Andrey Beloborodov

unread,
Mar 29, 2015, 11:43:19 AM3/29/15
to loopb...@googlegroups.com
hi, sorry for my bad english
I have an Activity A1.
Also, I have a service. When I create the activity, I request startService(...) that performs creating of container:
containerRepo.create(containerName, objectCallback);

Inside the service, there are a callback:
public void onSuccess(Container container) {
  final Intent intent = new Intent(getActionBroadcastGettingContainer());
  intent.putExtra(CONTAINER_STATUS, CONTAINER_STATUS_COMPLETED);
  intent.putExtra(PARAM_CONTAINER, container);
  sendBroadcast(intent);
}
In my BroadcastReceiver:
    @Override
    public void onReceive(Context context, Intent intent) {
    ...
    final Container container = (Container) intent
                                .getSerializableExtra(LoopbackService.PARAM_CONTAINER);
    }
But as I see in sources, VirtualObject.getRepository(), VirtualObject.getCreationParameters() are under @Transient  (Container is extended from VirtualObject )
How i can pass instance of Container in my A1 if i can't serialize/deserialize it?
Reply all
Reply to author
Forward
0 new messages