aaaaalbert / sensibility-testbed

1 stars 2 forks source link

Install ui simple functions #25

Closed msk610 closed 7 years ago

msk610 commented 7 years ago

Added UI functions

notifyMessage(String title, String message); /* push a notification */
toastMessage(String message); /* display a toast message */

That can be used at different points of the application to give some user feedback

lukpueh commented 7 years ago

@msk610 thanks for your PR! I'm not sure if we should merge your changes, because the functions you added to SensibilityActivity already exist in OutputService.

The OutputService is usually called from native (Repy/Python/C) code via the Java Native Interface (JNI), but nothing stops us from calling those functions e.g. from inside SensibilityActivity. You only have to pass the app's context to those functions since they are static and don't have access to the context on their own.