2014년 12월 26일 금요일

[App Inventor Open Source Development] Using STATIC to share component among screens

I'm working on the Bluetooth LE client, and what I've noticed is that it's hard to share among screens. There is only 1 real BTLE device on the phone, and I would like to share the connection among multiple windows:
  •  for example, you may want an APP that configures the BTLE connection, but another screen that processes the data. 

My first attempt, I used the tinyDB to share variables from the one screen to another, but the clocks and timers in the previous screen are no longer executing. My next thought in development, if I put all the BTLE state variables inside the class as "static", there is really only 1 instance of these variables, and the connection state etc will automatically carry over to the next instance of the BTLE component in the next screen. 

Has anyone used this technique to share info between screens?  



How complicated are your screens? 
You can put components inside arrangements and make arrangements visible or not visible.



@David, Have you seen THIS link regarding design / guidelines on developing AI apps using multiple screens?


댓글 없음:

댓글 쓰기