Share My Creation Animated GIF overlay (Fly overlay)

Update: new version on Google Play with configurable parameters and different gifs to choose from. Changed thread and app name

--- UPDATED Version 1.2: (will take a while for Google Play to update the version) Now you can throw them onto the screen limits so that they will bounce and buzz :D ----

moscaicon3.png
https://play.google.com/store/apps/details?id=com.twouchapps.fun.fly

Hi all,

This is one of those apps made in a few hours after a silly idea. Just for entertainment, or to prank your friends. Also, it will be the base for some new ideas that have come to my mind

I must confess that I have spent more time studying how to get realistic fly movements than coding :D:D Now I am a fly expert, ask me anything :)

Just test it please, report your fly experience if there are any issues, and rate it if you find it fun.:)
 

Attachments

  • moscaicon3x.png
    moscaicon3x.png
    99 KB · Views: 8,049
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User
i see this app with 1m downloads +
 
Last edited:

JordiCP

Expert
Licensed User
Longtime User
Thanks for the comments, I am already happy with them (although 1m downloads would make me for sure happier)

Now working in making the flies throwable to the screen borders with rapid dragging and adding some bzzzzzzzzzz sounds :D
 

JordiCP

Expert
Licensed User
Longtime User
Hi Rajan

Well, there are two very different parts to consider:

  • The first is the images management logic: to understand it, you can consider as if we were doing it in a normal activity. The basics are:
    • create an initialize an array of a custom type for each fly(object) where you store a reference to the view, the bitmap, position, direction and "speed". Rotation will be based on direction.
    • Then, there is a regular interval timer in which I modify randomly the direction, based in the previous one, giving the highest probability to keep going in the same direction and low priorities to change a bit to the left or a bit to the right.
    • Based on the new direction, calculate displacement and rotation, and update them on the view
    • As views can detect gestures, actions can be associated to them. For instance, if there is a drag, view position is updated. If it is fast enough, for a limited time you can give more speed to it (doubling the timer frequency and step length, for instance).
  • Then there is the overlay "magic"
    • Instead of an activity and Imageviews, I wrapped a code I saw for ChatHeads here, thanks to a post in this forum
    • They don't need to belong to any activity and can be attached directly to the system's window manager from a service.
    • Then I modified the behaviour for this special purpose
    • Everything with B4A and Inline Java ;)


I plan to share the code of the chathead wrapping (not the modifications to turn them into flies) in some days, possibly after new year :)
 

JordiCP

Expert
Licensed User
Longtime User
New version on Google Play, not only flies, you can overlay other animated items and configure parameters :)
 

Beja

Expert
Licensed User
Longtime User
I saw the video.. you made it so realistic that I wanted to throw up. The app is so great but in some cultures flies
and cockroaches are disgusting insects.. I hope you consider ants as well.
 

JordiCP

Expert
Licensed User
Longtime User
Thanks Beja!

With the current version you can choose different elements. Will consider ants if I find some :)


My concern now is to find good transparent gifs which I can use for commercial projects. There are many in the web, but some have poor quality whilst in others there is not enough info to be sure that I can use them without running into problems.
 

JordiCP

Expert
Licensed User
Longtime User
Hi sorex!

With this method the elements are on top of the other apps, not only when you are at your homescreen

About utility, as you can see, near to none :D. For me it makes sense when used as a chathead (pending to release the code for this)
 
Top