Posted on

FallOut-like Android Overlay Prank


android overlay prank

Hi, I found a beautiful app by some Norway game developers, which isn’t a game, but open source. And there were quite a few cool things about it – one of them is noise. So I decided to use that element and make a FallOut-like overlay prank or call it whatever you want

 

Here it is

android overlay prank

So it’s a view that’s drawn over other apps, the cool part is that it work over the navigation bar, even black.

Request Permission

We need to add this permission to manifest

For Marshmallow and above it requires extra permission which called Display over other apps

android overlay prank

You can find this screen in settings and you need to enable it for your app. I figured how to open this screen from code, for this app right away. So when first starting app it will open this screen/my app for user to grant permission

That’s weird that there’s no runtime easy kind of popup for that

Add Overlaying View

As you saw, I start a service, so first we create a Service and that’s the code inside of it

This stuff is just for overlaying a view on top of everything, it’s not touchable, so you can still use your phone. The real prank would be if view doesn’t let touch events pass through. Imagine this service starting at a random time in the background, then the only way to stop it is by restarting phone of with ads

Of course user need to grant permission first.

Noise Stuff

If you’re interested in how this noise actually works – check this repo, it’s basically a texture drawn in different places on the screen. And great thanks to origin app for being open source

 

Thanks for reading, subscribe if you like this stuff and share with friends if you think they’ll find it interesting.