PhoneWeaver

video

INDEX:

PHONEWEAVER PROFILES LOGIC
LOCATION PROFILES
AGENDA PROFILES
CONNECTION PROFILES
TIPS AND TRICKS
COMPATIBILITY
CPU and BATTERY USAGE
BLUETOOTH GREYED OUT
"HIDDEN" OPTIONS
PERMISSIONS

1. INTRODUCTION

'''PhoneWeaver''' is an application for Android devices, which mainly allows you to switch profiles. A profile can contain settings for sounds, ring tones, backlight, WiFi, Bluetooth, Phone (flight mode on/off), etc.
For example, you can create a profile that turns your sound ON on every weekday on 7 AM, and on every weekend day on 10 AM, and another profile that switches your sound OFF every day on 10 PM. This way, you never need to worry about waking up in the night when someone calls you, because you forgot to mute your device.

PhoneWeaver also offers a Widget and a Notification icon that allows fast recognition of currently running profile and have PhoneWeaver easily accessible!

2. PHONEWEAVER PROFILES LOGIC 


The PhoneWeaver logic is pretty complex. Many situations can be imagined, so it will be best to try some configurations and figure out what will work best for your needs. After two general (but important) comments, please study the example which will teach you the PhoneWeaver logic better than a difficult-to-understand explanation probably ever could.
Time based profiles are the base of the program. PhoneWeaver has a Day and Night profile by default, so there will always be a profile to fall back to. These profiles can be overridden by all profiles, no matter what the "Can override" setting is for them. The "Can override" setting does matter for Time, Agenda and Connection overriding a Location, Manual, Agenda or Connection profile. Location profiles are among Time and the other triggers: have higher priority than Time but lower than Manual, Agenda or Connection.
After a Connection profile expires because the device is no longer charging/connected, after an Agenda profile expired because the appointment ended, PhoneWeaver will return to the profile that should have been active at that time if it wouldn't have been overridden by the other profile.

An example
Let's assume that these five profiles are created:

  1. Day profile, Time based, activated on Monday-Friday at 07:00 and Saturday-Sunday at 09:00.
  2. Night profile, Time based, activated on Sunday-Thursday at 21:30 and Friday-Saturday at 23:00.
  3. Car profile, Connection based, activated on External Power plus Bluetooth handsfree or Car Dock if available.
  4. Mute profile, Manual based.
  5. Office profile, Agenda based, activated on appointments with the "Office" word defined in appointment location.



  • If you wake up at 06:30 your device will be on the Night profile.
  • At 07:00 it will switch to the Day profile. (No matter if it is suspended or not)
  • At 09:15 you have an appointment for which the location is "Office", so the profile is changed to Office.
  • It doesn't matter if you have the "Can override" option set here, since every profile can always override a Time based profile (the Day profile in this case).
  • At 10:30, the appointment is ended, so the Office profile is ended again and PhoneWeaver will return to the Day profile which was previously active.
  • At 12:00 you have an appointment which has the "Client home" location. Since you didn't create a profile for this, the profile will remain at the Day profile.
  • At 13:00 that appointment ends. The active profile is still the Day profile.
  • At 14:00 you have another location "Office" appointment. The profile will switch to Office.
  • At 14:15 you get an important phone call: emergency! You will need to leave the appointment and get in your car. When you put your device in the car dock, the Car profile is started ONLY if the Car profile is set to "Can override". If it is not set to "Can override", the Car profile can not override the Office profile and the Office profile remains active. Let's assume the Car profile can override the Office profile and the Car profile is activated.
  • If you now get out of the car, two scenario's will be possible:
  • If the appointment in your calendar didn't finish yet, PhoneWeaver will return to the Office profile. After the appointment ends, it will return to the Day profile.
  • If the appointment in your calendar did already finished, PhoneWeaver will return to the Day profile immediately.
  • After a long day, you have dinner with your partner. You wish not to be disturbed, so you manually select the Mute profile.
  • After dinner, you select PhoneWeaver Auto to return to the Day profile.
  • At 21:30 or 23:00 (depending on what day it is), the Night profile is activated.





3. TIPS AND TRICKS

Here are some ideas to help get you started with PhoneWeaver.

Create two Time profiles to begin with. This will give you a solid basis and you won't have to worry about your settings on day/night any more. These profiles will automatically follow on each other.
-A Day profile that starts when you get up. Let that turn on your Phone to start receiving calls and messages, and enable Bluetooth. Also set your Main and Call volume to 80 %, and your Ring volume to 100 %.
-A Night profile that starts at your bedtime, and that turns your Phone off to prevent incoming calls/messages. Also disable Bluetooth. Decrease your volumes to 50 % to be notified of any alarms on a nice volume.

Create a Car profile that is triggered on Connection (External power AND Bluettoth hansfree or use carc Dock if you have a compatible one). Put your sounds and backlight to the maximum, and disable WiFi (you won't need it in the car). Enable Phone. Also, let this profile start your GPS device and execute your GPS navigation software.

Create an Agenda based profile that starts on appointments with the calendar you use for work and set a word that defines when the device should mute during appointments. Let it decrease your volumes, and let it start the application that you use for your business.

Create a temporarily Muted profiles that will revert to Automatic (with sounds) mode after two hours for you cinema sessions, church, etc. This will avoid that you forget to activate sounds again!!


A general tip is to carefully review your profiles. If you disable the Phone functionality with one profile, be sure to enable it again with another profile if you need to. Do not make the mistake to set it to "No Change", and find out later that you missed an important call because your Phone functionality was disabled!



4. COMPATIBILITY


PhoneWeaver is designed to get the most of your phone. Due to the fact that different Android API versions have different capabilities, PhoneWeaver adapts automatically to what your phone can do. PhoneWeaver can run in any device from Android 1.5 to Android 2.2 and up.



5. CPU and BATTERY USAGE


PhoneWeaver is carefully designed to not waste your device resources. There are no background processes or services at all that can drain your battery or make your device slugish.
All PhoneWeaver actions are based on system alarms that are received at certain times or when something happens on the device, like being conected to external power, etc. PhoneWeaver never does polling.

Theres is only one exception: Android only allows certain features to be available to running processes, so I've implemented a PhoneWeaver Service.
This service will only runs when it is necessary, what means when at least a profile have defined some conditions that need the service to be monitored. The service will only receive notifications for that conditions and resend them to the main PhoneWeaver program, so no background job is done by the service under normal conditions and so no battery drain neither cpu usage is done at all.
Currentñy the service only works when battery level or wired headset connection profiles are created.



6. LOCATION PROFILES


At least the Phone radio must be on for location profiles to work. No need for data connection neither 3G being active.

Having WIFI on improves the location precission a lot when WIFI networks are available, even if we aren't connected to them.

As phoneWeaver doesn't need high precission in location, it is better that you deactivate GPS location services (or turn GPS off by means of PhoneWeaver itself), in order to save battery.

Location profiles will cause that the Android operating system control if you are near or far from the points where location profiles are defined, and this of course will mean more resource usage. But Android will use resources in a smart way, verifiing the location less frequently when you are far from the defined locations.



7. AGENDA PROFILES


Currently Android doesn't inform applications when an appointment is created, deleted or updated. So PhoneWeaver will verify every 30 minutes if something have changed. This mean that a modified, created or deleted appoinment could take up to 30 minutes on being taken into account by PhoneWeaver. if you need inmediate update, use "Phoneweaver auto option".

This verifications only happens if Agenda profiles are defined, and we have verified that the resource consumption they caused are equivalent to only 5-15 seconds of having the device on in a whole day.


The trigger for Agenda profiles can be filtered so only certain appointments trigger the profile. This can be done limiting it to appointments with a specific word in its Subject or Location (Several words can be set with OR clauses) or to a busy / available state.


8. CONNECTION PROFILES


Desk and Card dock detection is only available for Android compatible Desk and Car docks. Not all the docks in the market have this compatibility. Ask your vendor for further information.

When selecting a Desk docking as trigger condition, do not add external power condition: in some cases external power causes chatter (bounces) and could cause the trigger condition not recognized. As external power is not needed to recognize Docks, leave this as ignore.


9. BLUETOOTH GREYED OUT


Bluetooth option is greyed out when you have selected to turn off the Phone because Android doesn't allow BT on in Flight mode.


10. "HIDDEN" OPTIONS:

Long touching a profile in the main screen, a advanced profile triggering popup menu appear. In this menu you can block a profile or if the profile is manual, set or change the timeout period.


Long touching a profile in the edit screen will allow us to reorder, delete, disable / enable, rename or hide/show from main menu that profile.
Hiding a profile from main menu only avoid it to appear in the main screen, but it continues working. Useful for profiles that we never launch manually. Disabling a profile hides it from the main menu and avoids it to be triggered. Usefull for maintaining a profile inactive for later use.


11. PERMISSIONS

Its important that you know why an application uses Android permisions to ensure that nothing that you don't want to is done without your knowledge. PhoneWeaver uses the following Android permissions:

BLUETOOTH and BLUETOOTH_ADMIN for bluetooth control.
ACCESS_WIFI_STATE and CHANGE_WIFI_STATE for WIFI control.
ACCESS_FINE_LOCATION and WRITE_SETTINGS for GPS control.
READ_PHONE_STATE, MODIFY_PHONE_STATE for phone adio control.
MODIFY_AUDIO_SETTINGS for autoanswer and volume control.
WRITE_APN_SETTINGS for Data connection control.
RECEIVE_BOOT_COMPLETED for adjusting the profile after a reboot.
WRITE_EXTERNAL_STORAGE for logging and export/import profiles to the sdCard,
RESTART_PACKAGES and KILL_BACKGROUND_PROCESSES for terminating launched applications control.
WAKE_LOCK to allow triggering profiles while suspended.
ACCESS_COARSE_LOCATION and ACCESS_LOCATION_EXTRA_COMMANDS for location based triggering.
READ_CALENDAR for Agenda based triggering.