Пример #1
0
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_reflection);
   SFBridgeManager.register(this);
   SFBridgeManager.register(myObject);
 }
Пример #2
0
 @SFIntegerMessage(messageId = ActivityMessageId.OBJECTTEST1, theadId = ThreadId.BackThread)
 public void objectTest1(String str, Integer num) {
   Log.e(TAG, "method->objectTest1,str: " + str + " num: " + num);
   L.error(TAG, "method->objectTest1,thread name: " + Thread.currentThread().getName());
   if (num == 4) {
     SFBridgeManager.unregister(this);
   }
   SFBridgeManager.send(ActivityMessageId.OBJECTTEST1, "object hello", ++num);
 }
Пример #3
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   SFBridgeManager.unregister(this);
 }
Пример #4
0
 private void doObjectTest1() {
   SFBridgeManager.send(ActivityMessageId.OBJECTTEST1, "object hello", 1);
 }
Пример #5
0
 private void doTest2() {
   SFBridgeManager.send(ActivityMessageId.TEST2);
 }
Пример #6
0
 private void doTest1() {
   SFBridgeManager.send(ActivityMessageId.TEST1, "hello");
 }