0

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.

Small App

Best Regards,

Cookie

CookieMonssster
  • 658
  • 1
  • 6
  • 19

1 Answers1

2

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:

  • you need the permission android.permission.SYSTEM_ALERT_WINDOW on your manifest
  • get the WindowManager with getSystemService(WINDOW_SERVICE)
  • build the view you want to show with context.getApplicationContext() (if you try an activity, service or broadcast receiver context it won't work).
  • and call addView(View, LayoutParams) to add it to the screen.
Budius
  • 39,391
  • 16
  • 102
  • 144