Showing posts with label sensors. Show all posts
Showing posts with label sensors. Show all posts

Monday, April 8, 2013

More bounce to the ounce..

So, finally fixed the issue with motion detection on Galaxy Note 2 phones.

The shake to refresh and bouncing cube didnt work at all.

Turns out it is abug in Samsungs Firmware, the shake events were all being tagged as unreliable, so were being discarded.

I fixed it to ignore the unreliable tag, so they are now being let through and the Note 2 has its bounce back!

Version 3.2 on the Google Play store now..

Tuesday, June 5, 2012

Shaken not stirred..

Work on the Motion Detection continues at a good rate.

I have completed the Shake to Refresh for Album mode. When a shake is detected, the cube and floating panels quickly shrink into the screen, and then swiftly restore back to their original size with the newly refreshed pictures. The time for this operation will depend on the speed of the phone, but is usually less than a second. Looks very cool!

Jerking the phone left or right now gives the cube a bit of extra spin in that direction. That took a good bit of working out, particularly because the direction depends of course on how the phone is held, working out which way is really "right" or "left" can vary enormously, particuarly on newer devices like tablets, which can have 4 distinct orientations, not just landscape and portrait.

Today got the maths working for the 3D background effect, the phone now seems like a window on the background, tilting it left or right shows the background from another angle, as if you were walking past a window and looking out, the view through the window would change. A very subtle, cool effect, but I need to make it super smooth, its still a bit jerky. I think a day or two more for that.

Then need to extend the jerking effect to give the cube a bounce off the "walls" of the phone.

All this new Motion Detection stuff will be in a major new 3.0 release. I want to do a nice Settings screen, with nice previews of the effects.

Last night I did a quick bug fix release 2.5, to fix a few issues that had come up from Album mode, mostly from when users had only a single picture in an SD card album.





Wednesday, May 30, 2012

Shake it like a Polaroid picture!

I am happy to report that Photo Cube 2.4 was released last week, and the new Album mode is proving as popular as I suspected.

This week I have been playing around with the Android  sensors, seeing how I can apply 3d movements of phone and tablets to Photo Cube.

The first idea is detecting shakes.


At the simplest level, it can already detect that you are shaking the phone (say 2 or 3 back and forth movements in any direction), and if you are in Album mode it can then trigger the pictures on the cube to refresh. That is pretty cool! But as there is a slight visual glitch when it updates, I am trying to work out the best way to distract from that, such as giving the cube an extra spin, or perhaps rapidly shrinking it, changing the images then restoring to the usual size. I will go with whichever looks best. I tried a simple "Refreshing from album" message but it looked ugly, I am not having that. :o)

Next, detecting a left or right movement on the phone can be used to give the cube a bit of extra spin in that appropriate direction. Still playing with that so it doesn't clash with shaking, and making it jive with the extra spin you already get when you pan your home screen left and right.

Other motion ideas would be to detect left, right, up or down movement and then perhaps bounce the cube in that direction, so you could shake the phone up, and the cube would rapidly move up, bounce off the top of the screen then return to its usual place. Same idea for backward and forward, but instead have it grow and shrink. I think the bounch off the "sides" of the screen would be accompanied by a reversal in rotation direction as well, to give more of a 3d realistic feel, kind of the same way a football changes its rotation when bounced off a wall.

The final idea is to make the background appear "behind" the phone using a 3d parallax effect; this would be done by detecting a small rotation angle of up/down, left/right, and shifting the background image a little bit down/up, right/left in response. The maths for that is pretty complex, I need to learn all about 3d rotation matrices so this will be a little harder to implement.

Of course, all these motion detection features will depend on the phone actually supporting them, so will only be enabled when the appropriate sensors exist on the phone. And as usual I will make them all optional, as using those sensors do take a little bit more battery life. However, they would only be used when the Photo Cube wallpaper is actually visible, i.e. no other app is running, and to be honest then the biggest battery drain is always the Screen itself rather than the relatively small amount of calculations Photo Cube requires.

I want to get some of these ideas finished before I move back to my other long delayed top secret app, which is still totally unique and has no equal in the market. ;o)