maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Auto answer (https://talk.maemo.org/showthread.php?t=64444)

nicolai 2010-11-18 09:47

Re: Auto answer
 
For the car-mode profile, as I already told fuel__2001,
ProfilesX can not be used to start specific actions. ProfilesX can
only change the profile settings (ringtone, vibra, ...)
But the whole benefit of ProfilesX is to define more than those
to builtin profiles.
So you could go the other way around.
Use ProfilesX to define a new profile "Car Mode".
(Just to have a special named profile)

Now your autoanswer script could listen on dbus for
the active profile (profiled emits a dbus-signal if the
user changes the active profile).
And if the current profile has this special name,
enable autoanswer or speaker mode ...

nicolai

systemcrash 2010-11-18 10:09

Re: Auto answer
 
Quote:

Originally Posted by fuel__2001 (Post 854999)
In symbian (N95) the auto answer was placed in the profiles. I remember setting a profile up so i would only have to insert my headphones (which was usually when i was driving) and the phone would answer automatically.

any other thoughts about the placement of the button?

I agree the best place to put the button is the profile. Should it be a check button as for the vibrator setting (sorry if vibrator is not the exact word, I have my device set to use spanish)?

fuel__2001 2010-11-18 20:33

Re: Auto answer
 
Quote:

Originally Posted by nicolai (Post 876891)
So you could go the other way around.
Use ProfilesX to define a new profile "Car Mode".
(Just to have a special named profile)

Now your autoanswer script could listen on dbus for
the active profile (profiled emits a dbus-signal if the
user changes the active profile).
And if the current profile has this special name,
enable autoanswer or speaker mode ...

nicolai

Is this something you would be able and willing to do?

As its well beyond the scope of what i'm currently able to achieve with my limited knowledge.

fuel__2001 2010-12-13 04:40

Re: Auto answer
 
Im finally starting to understand what I need to do to get this script to work.

I've read a little about dbus but im not sure how to point my script at profilesx, so when a certain 'named' profile is selected my autoanswer script starts.

This is as far as ive got and thats not right, can someone get point me in the right direction please

Code:

bus = dbus.SessionBus()
proxy = bus.get_object('com.nokia.profiled', '/home/user/.profiled/current')


nicolai 2010-12-13 07:10

Re: Auto answer
 
Looking at my code, how I listen to profile
changes, I realized it may be easier to include
this in profilesx. Even though I said profilesx
is only for managing profiles settings, my
statusbar plugin is listinig for profiles changes to
change the profile icon.

So, I can make an extra option in the settings dialog
for autoanswer and my statusbar plugin can
autoanswer the incomig call depending on the
current profile.

nicolai

fuel__2001 2010-12-13 12:00

Re: Auto answer
 
Quote:

Originally Posted by nicolai (Post 895676)
Looking at my code, how I listen to profile
changes, I realized it may be easier to include
this in profilesx. Even though I said profilesx
is only for managing profiles settings, my
statusbar plugin is listinig for profiles changes to
change the profile icon.

So, I can make an extra option in the settings dialog
for autoanswer and my statusbar plugin can
autoanswer the incomig call depending on the
current profile.

nicolai

That would be brilliant if you could manage slip the script into profilesx.

So let me get this right - Are you thinking it would it be dependent on a specific 'named' profile to start the script?
Or, to add a checkbox widget to the profile settings, so any selected profile could be set up to use the script?

nicolai 2010-12-13 13:14

Re: Auto answer
 
This one:
Quote:

Originally Posted by fuel__2001 (Post 895841)
Or, to add a checkbox widget to the profile settings, so any selected profile could be set up to use the script?

nicolai

fuel__2001 2010-12-13 13:29

Re: Auto answer
 
I think using a widget in the settings leaves profilesx more configurable.

You could then add a specific ring tone or icon to any 'named' profile of your choosing :)

nicolai 2011-01-17 22:22

Re: Auto answer
 
Finally it is done.
ProfilesX Version 0.8 with autoanswer and loudspeaker option.
You can select to enable autoanswer and / or loudspeaker for
the general and every user defined profiles.

With autoanswer enabled, the phone automatically accepts
phone calls (cellular only, no skype) after 1 second.
But only if the proximity sensor isn't covered. That way it won't
accidently accept the phone call while your phone is in your
pocket.

The loudspeaker option will switch to speaker mode when then
call is accepted.

Thank you fuel_2001 for this great idea.
regards
Nicolai

PUNK 2011-01-19 02:48

Re: Auto answer
 
Great!THX a lot!


All times are GMT. The time now is 20:03.

vBulletin® Version 3.8.8