Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[APP] Flip4Silence 2.0 - Silence notifications when your phone is flipped!

OP Luminger

15th January 2012, 06:21 PM   |  #1  
Luminger's Avatar
OP Member
Thanks Meter: 68
 
87 posts
Join Date:Joined: Oct 2010
Donate to Me
Flip4Silence 2.0 BETA
Silence notifications when your phone is flipped - battery friendly!

Flip4Silence is back! It's just an BETA version but it already serves its purpose: Silence notifications when the phone lays upside down on the table! And the best thing about this, it doesn't eat up your battery (like other tools do)!

I just finished the BETA and I'm currently testing it. But as I think it could be useful to someone in this state I just made it public. Please be so kind and keep in mind that this is not the final and probably will not act as reliable as it should. I will do my best to fix any bugs which are found, so please report your problems back.

If you are a ROM chief or have a custom ROM installed:
I have planned to migrate this tool to a "one for all" tone silencer. Unfortunately this requires a patch (which is attached to this post) to allow the user to set the tones as the system defaults. The patch is also posted on the AOSP gerrit and may be accepted (don't know if they like the patch) and I will try to integrate it into CM9.

If you are a ROM chief and would like to integrate the patch and the (upcoming) tool feel free to contact me via pm.

If you are a user of a custom ROM feel free to encourage your ROM chief to integrate the patch.

Feel free to contact me if you have integrated the patch somewhere, especially if it's a ROM for the Galaxy Nexus or Nexus One as I would like to use it on my own phones

Attention:
If you had a previous version installed I'm very sorry to tell you that you have to REASSIGN every single ringtone you have selected with F4S Ultimate before again due to a internal incompatible change!

What it gives you:
  • Silence nearly every notification!
  • Is planned to be a full replacement for every ringtone picker (please tell me what you want from your ringtone picker)
  • It's nice to your battery as it's only active when something happens and not all the time.
  • More control over the sensitivity used (no more "low", "high", "normal", you are in charge now!).
  • MP3 ringtones are now supported! The UI is not really finished, it's at least planned to add the album covers to the list.
  • "Silence when user is present" - never get a notification sound again when you are playing with your device and don't need a audio notification.

What it can't do:
  • You can't use it to put silenced ringtones into the default settings. Please never ever put a silenced ringtone into your phone ringer or the default notification sound. It will just not work (and will never), trust me. However, you can put in a "unsilenced" ringtone (more later).
  • Currently the sensors will report strange results if you have vibration on while a ringtone is played. It lacks a good filtering, so it's not really usable currently.

How to use it?
It has currently no settings dialog at all, it is just a alternative to pick a ringtone. When you select somewhere a "Choose a ringtone now" button it will be an option which you can launch.

When you select your tones with the tool it will more or less look like the standard ringtone picker with some exceptions. On the bottom you will see a list with all ringtones you may pick from. When you select them, they will be played as a preview to you (just like the stock ringtone picker does). When you have found your ringtone just hit the tick button at the top bar and you are done. It will now silence this (and only this) notification when the phone lays on its display. When you want to discard your selection just hit the cross on the top, the back button of your phone or the home button, it's your choice.

The really interesting thing is the speaker icon at the top bar. It works the following way:
When you see the muted speaker (speaker with X) the ringtone will be silenced when you hit the tick button (sure, it will only be muted when the phone lays upside down). But sometimes you want a sound so be played everytime and not only when the phone lays with its back on the table. Then you can press the speaker at the top and it will switch over to a unmuted speaker. When you now hit the tick the selected tone will never be muted by the tool.

You can now start over and replace every notification sound with a one selected via this tool. Just pick a tone and hit the tick at the bar and you are done.
I'm currently using gingerbread and was able to replace the tones in the following applications:
  • Stock SMS/MMS
  • gTalk
  • Google+
  • Facebook
  • Flip4Silence

How does this sensitivity slider work?
It allows you to set the exact degree when Flip4Silence should recognize the phone as "lays on its screen". The range is from 0 (lays exactly on its screen) to 90 degree (stands on its bottom).

You can change the value with the slider or with the plus and minus button to a value which should fit your need (it lacks a testing mode, sorry :/).

The green part of the slice on the left is a visualization of the "snap area" where Flip4Silence will recognize the phone should be silent. You can transfer it to the real world when you put your phone with its bottom on the table which would be 90 degree. When you now tilt it slowly down to it's screen it would be 0. So you have actually moved it on 90 degrees of a circle which is what the image tried to tell you.

The settings are now this way because people reported that LOW and HIGH weren't enough to trigger it the way they wanted it. The dialog still lacks a "choose from presets" option but this will hopefully be added in the future.

As a hint here are the settings known from F4S 1.0 (which will suit the most people)
  • High: 20 degree
  • Normal: 25 degree
  • Low: 30 degree

So you say it's now save to use it to pick global ringtones?
Yes, in general it is. The picker maintains now a blacklist for Activities which aren't able to handle the special ringtones we return. This blacklist currently only has the stock settings blacklisted so it should work for most devices. But HTC/Motorola/Samsung may have changed ROMs in a way that they also changed the identifier for the SystemSettings. In this cases the blacklist will not work until I have added them

So as it's more or less save, here is the warning again:
Please note the fact that you should never ever use a "silenced" ringtone for the ringer or the default notification sound. The new BETA tries to prevent you from doing so (the little speaker on the top is not drawn) but it may fail! If you see a speaker in your Default Notification/Ringtone picker than please hit the "Report usage" button in Flip4Silence ultimate so I can add it to the blacklist.

What does this "Report usage" button do again?
As stated above it will send a report to me about the places where you have used Flip4Silence Ultimate to select a ringtone. Please only send the manual report if you have found out that your System Settings is not blocked from setting a silenced ringtone (as described above). Please also leave a short note here that you have send a report. Reports contain the same data as crashreports, so nothing is really special about them.

"Silence when user is present" does what?
Did it ever annoyed you to hear notifications when you got your device in your hand? Did you ever thought "Damn, shut up! I have seen the notification, no need to play a sound...".

If yes, then I have a solution for you: "Silence when user is present" does simply what is says, it blocks the notification sound when you are currently fiddling with your device and don't need another acoustic notification about a new message or anything else.

Of course it only works with sound which were set with this app and currently the switch is on a global base (will likely change in an upcoming version).

Okay, sounds good so far, where can I get it?
I will attach the newest version and the previous one to this post whenever an update occures. You can also download it on the Android Market

Why is this nifty app not translated into [INSERT LANGUAGE HERE]?
I will contribute at least a German translation once the strings in the program have settled down (one or two releases before the first stable will be released). If your favorite language is missing and you are willing to translate it by yourself please contact me and I will hand the localization files when the app has reached the pre stable state.

The icons used are nice, but the application icon is damn ugly dude!
Yea, I know. I had to make some of my own when I developed Flip4Silence so the quality is far from good. While I like the overall theme (the phone and the sleep indication) it's not really pretty as I'm more the coding guy than a designer. If you are a designer or know someone who would like to make some icons for this app it would be awesome if you would contact me. I can't provide any money for this as it's only a fun project but it would be worth a credits entry and publicity (it depends, but I expect a broad usage around the globe, just like the original Flip4Silence ).

Uh, who has done this cute icons you are using?
The icons used in the main view of the ringtone picker are from AndroidIcons.com. Thanks guys for this great set of free icons!
Attached Thumbnails
Click image for larger version

Name:	1.0-BETA4-1.jpg
Views:	376
Size:	33.3 KB
ID:	992386   Click image for larger version

Name:	1.0-BETA4-2.jpg
Views:	404
Size:	23.6 KB
ID:	992387   Click image for larger version

Name:	1.0-BETA4-3.jpg
Views:	322
Size:	17.6 KB
ID:	992388   Click image for larger version

Name:	1.0-BETA4-4.jpg
Views:	280
Size:	18.5 KB
ID:	992389  
Attached Files
File Type: apk Flip4Silence Ultimate-1.0-BETA3.apk - [Click for QR Code] (381.0 KB, 188 views)
File Type: apk Flip4Silence Ultimate-1.0-BETA4.apk - [Click for QR Code] (611.6 KB, 28 views)
File Type: apk Flip4Silence Ultimate-1.0-BETA6.apk - [Click for QR Code] (611.3 KB, 98 views)
File Type: patch settingsprovider.patch - [Click for QR Code] (6.5 KB, 27 views)
Last edited by Luminger; 15th April 2012 at 02:37 PM. Reason: BETA is out!
The Following 10 Users Say Thank You to Luminger For This Useful Post: [ View ]
19th February 2012, 01:33 PM   |  #2  
Luminger's Avatar
OP Member
Thanks Meter: 68
 
87 posts
Join Date:Joined: Oct 2010
Donate to Me
Changelog
  • 1.0 BETA6
    • Fixed BETA4 bugs.
  • 1.0 BETA5 (skipped due to major bugfix fail)
  • 1.0 BETA4
    • Resolved all BETA3 problems
    • Feature: added 'Silence when user is present'
    • Added ICS SoundPreferences to caller blacklist
    • Minimal Android version bumped to Eclair as I updated ActionBarSherlock
  • 1.0 BETA3
    • Local music is now selectable.
    • Choose if you want to send your systemlog on crash
    • Bugfix: Crash on settings when empty skip value was given.
    • Blacklist for SystemSettings added (at least for stockroms)
  • 1.0 BETA2
    • Fixed critical bug (default settings weren't read causing infinite sensor poll...)
  • 1.0 BETA
    • Bugfixes (a bunch, should be more stable now)
    • Added sensitivity settings dialogue
    • Added ACRA for error reporting (you may opt out)
  • 1.0 ALPHA
    • Initial release

(maybe) Upcoming Features
  • List of default ringtones to set (for easier reselection of the same tones)
  • Some kind of indicator which ringtone was previously selected (in tune lists)
Known Bugs:
  • BETA4: The 'local media' selection breaks when you have more than 2 songs on your phone (stupid me, should have tested this...)
Resolved Bugs:
  • BETA4: Crashes in the 'sensitivity picker' due to a random/rare stackoverflow condition
  • BETA4: Crashes in the 'local music picker' due to a uninitialized object
  • BETA3: It's possible to assign a silenced ringtone to a blacklisted caller by changing the device configuration (change view to landscape)
  • BETA3: includes GTalk in the blacklist (added it for testing purposes, forgot to remove it...) so you can't set a silenced ringtone to it...
  • BETA3: Some database queries and lost cursors create warnings in the systemlog
  • BETA3: ticking "include systemlog in reports" is useless the app lacks the required privileges (will be removed)
  • BETA3: the sound settings activity used by Android 1.6 is missing in the blacklist
  • BETA3: it looks like that at least the Android 1.6 emulator has problems displaying the pick list columns correctly.
Last edited by Luminger; 15th April 2012 at 11:22 AM. Reason: Added more known bugs...
The Following User Says Thank You to Luminger For This Useful Post: [ View ]
19th February 2012, 02:31 PM   |  #3  
icke's Avatar
Senior Member
Flag Ahaus
Thanks Meter: 1,092
 
1,755 posts
Join Date:Joined: Feb 2007
Donate to Me
More
Do U think it is possible to also disable vibration on incomming calls? It was working on Gingerbread but not longer on ICS (at least for me)
The Following User Says Thank You to icke For This Useful Post: [ View ]
19th February 2012, 02:36 PM   |  #4  
Luminger's Avatar
OP Member
Thanks Meter: 68
 
87 posts
Join Date:Joined: Oct 2010
Donate to Me
Quote:
Originally Posted by icke

Do U think it is possible to also disable vibration on incomming calls? It was working on Gingerbread but not longer on ICS (at least for me)

Flip4Silence classic doesn't work correctly on ICS? Didn't knew that, sure I will try to fix this in this rewrite (the old app will not receive any update, everything will be reimplemented).

I will give it a try when I move the old code to the new codebase but I can't promise anything as I don't know whats broken and so don't know how it may be fixed.

But thanks for the report =)
19th February 2012, 02:49 PM   |  #5  
icke's Avatar
Senior Member
Flag Ahaus
Thanks Meter: 1,092
 
1,755 posts
Join Date:Joined: Feb 2007
Donate to Me
More
OMG!
Just installed older version from market. I know why it wasn't working..."Keep vibrating" was still enabled.
Sorry...my fault.
The Following User Says Thank You to icke For This Useful Post: [ View ]
19th February 2012, 02:50 PM   |  #6  
Luminger's Avatar
OP Member
Thanks Meter: 68
 
87 posts
Join Date:Joined: Oct 2010
Donate to Me
Quote:
Originally Posted by icke

OMG!
Just installed older version from market. I know why it wasn't working..."Keep vibrating" was still enabled.
Sorry...my fault.

No problem at all, so I can note down that F4S Classic also works on ICS? Good... =)
19th February 2012, 02:52 PM   |  #7  
icke's Avatar
Senior Member
Flag Ahaus
Thanks Meter: 1,092
 
1,755 posts
Join Date:Joined: Feb 2007
Donate to Me
More
Quote:
Originally Posted by Luminger

No problem at all, so I can note down that F4S Classic also works on ICS? Good... =)

Yepp...definitely working on ICS.
The Following User Says Thank You to icke For This Useful Post: [ View ]
19th February 2012, 03:03 PM   |  #8  
Senior Member
Thanks Meter: 375
 
1,751 posts
Join Date:Joined: Jun 2009
Donate to Me
More
Glad you haven't abbandoned this project. I will test it soon on my NS.

Sent from my A710 using xda premium
The Following User Says Thank You to bioan For This Useful Post: [ View ]
5th March 2012, 06:28 PM   |  #9  
Luminger's Avatar
OP Member
Thanks Meter: 68
 
87 posts
Join Date:Joined: Oct 2010
Donate to Me
I just release BETA3. As nobody reads the main post again, please note the following:

You generally don't have to take special care about the System Settings default sound picker as it's now blacklisted as it not supports F4S Ultimate. Consult the main post for more info about this. But If the little speaker at the top is shown for you in the default settings please hit the "Report usage" button and send me some info about your phone (again, more info is hidden in the main post ).

If you had a previous version installed I'm very sorry to tell you that you have to REASSIGN every single ringtone you have selected with F4S Ultimate before again due to a internal incompatible change!

Also I would like to say "Thank you!" to everybody who is currently testing/using this! I have not thought that so many people would try it! Thank you very much!
Last edited by Luminger; 5th March 2012 at 06:35 PM.
The Following User Says Thank You to Luminger For This Useful Post: [ View ]
6th March 2012, 03:38 PM   |  #10  
slovoflud's Avatar
Senior Member
Thanks Meter: 27
 
865 posts
Join Date:Joined: Mar 2008
More
Quote:
Originally Posted by Luminger

I just release BETA3. As nobody reads the main post again, please note the following:

You generally don't have to take special care about the System Settings default sound picker as it's now blacklisted as it not supports F4S Ultimate. Consult the main post for more info about this. But If the little speaker at the top is shown for you in the default settings please hit the "Report usage" button and send me some info about your phone (again, more info is hidden in the main post ).

If you had a previous version installed I'm very sorry to tell you that you have to REASSIGN every single ringtone you have selected with F4S Ultimate before again due to a internal incompatible change!

Also I would like to say "Thank you!" to everybody who is currently testing/using this! I have not thought that so many people would try it! Thank you very much!

If you want to keep a secret, post it in the OP!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes