0

I have an idea sprung from the shortcut that Google Photos nowadays puts in the camera (after you have made that setting in Google Photos): https://www.cnet.com/how-to/add-a-google-photos-shortcut-to-your-android-camera-app/

But whats the basic principle behind the implementation of that floating shortcut that shows up ONLY in the camera (and is invoked by taking the first picture)?

My goal is to make such a system overlay button/image that shows ONLY in/over specific apps.

If its any lead, the Google Photos shortcut overlay moves on top of for example Facebook chat heads. And it is hidden/gone when device has been in standby/sleep, then yoy have to take a new picture for it to show up.

Thanks for any advice!

//Magnus

Magnus
  • 31
  • 1
  • 5

1 Answers1

0

Disclaimer - I never tried this, but here's how I think it can be done:

  1. Activity does not necessarily need a layout, create an activity which only displaying a button/other view or layout when a trigger occurs, source:

An activity is a single, focused thing that the user can do. Almost all activities interact with the user [...]

check it out here: http://developer.android.com/reference/android/app/Activity.html

  1. You could/should create an app which is "drawing over other apps"

Check this one out here: https://stackoverflow.com/questions/14129595/draw-over-other-app-is-which-permission-in-android

  1. Use a BroadcastReceiver to intercept the apps you are targeting are laumched or active
Community
  • 1
  • 1
sup4eli
  • 324
  • 3
  • 16