I've got Sony Xperia Smartphone and there is a Sony feature - Small Apps (screen below), which are always on top of the screen or they minimalise to small square on right side. Very similar functionality have Facebook Messanger. Anybody knows how to do application like this? It is kind of service with GUI or what? There is any library from Google or it is only Sony and Facebook APIs? I even have no idea how to look for it in the Internet, so I will be grateful for some keywords or example.
Best Regards,
Cookie
it's a UI without activity. I'm pretty sure any network/disk operations on it gets delegated to a Service, but that depends on how you organise your app.
the basics for it is:
android.permission.SYSTEM_ALERT_WINDOW
on your manifest WindowManager
with getSystemService(WINDOW_SERVICE)
context.getApplicationContext()
(if you try an activity, service or broadcast receiver context it won't work). addView(View, LayoutParams)
to add it to the screen.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.