maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Change Song by shaking phone possible? (https://talk.maemo.org/showthread.php?t=45352)

necoicould 2010-02-21 19:25

Change Song by shaking phone possible?
 
Is it possible to install any app and then to change song by shaking the phone ? I think it would be possible..but how?

Figa 2010-02-21 19:26

Re: Change Song by shaking phone possible?
 
Look to devel.

b666m 2010-02-21 19:29

Re: Change Song by shaking phone possible?
 
it's in testing too:
http://maemo.org/packages/view/shake2control/

add testing repository and install it via appmanager.
(but testing-apps are maybe not so stable and might cause problems on your device)

Laughing Man 2010-02-21 19:29

Re: Change Song by shaking phone possible?
 
I think the shake2control app in extras-devel does that (unsure though). I think it might be play/pause right now though it shouldn't be to hard for the developer to change it to change song or whatever.

But standard warning about installing extras-devel software (could potentially cause problems) is advised.

zail 2010-02-21 19:34

Re: Change Song by shaking phone possible?
 
It does let you stop/ start and change track by shaking.. I've had it installed for a week or so now and no probs... but like all of the accelerometer based apps I've seen it's not always very reactive....

DarkPand0r 2010-02-21 19:42

Re: Change Song by shaking phone possible?
 
Its a very buggy application currently.

Shake Left/Right and it'll change the track (Next track)
Shake Up/Down and It'll Pause/Play

The problem is quite often it won't work for 5-10 minutes then suddenly start......On top of that occasionally it just WON'T work unless I do a phone reset. And yes, It does have a problem with sensitivity at times too, Sometimes I just have to touch it and it'll change, other times I have to jerk it hard to get any response.

b666m 2010-02-21 19:52

Re: Change Song by shaking phone possible?
 
look at the source-code:
Code:

// Check if device is in the cover eg. in the pocket etc.
  // If not, then read accelerometer
  FILE *fid = fopen("/sys/bus/platform/devices/proximity/state","r");
  if(fid!=NULL){
   
  rs=fscanf((FILE*) fid,"%s",&str);
  fclose(fid);
  if(str[0] != 'c'){
   
    FILE *fd = fopen("/sys/class/i2c-adapter/i2c-3/3-001d/coord","r");
    if(fd!=NULL){
 
    rs=fscanf((FILE*) fd,"%i %i %i",&x,&y,&z);
    fclose(fd);
 if( y<-1700 || y>1700){
      g_print("\nNext track");
      mafw_renderer_next(MAFW_RENDERER(self->renderer), error_cb, NULL);

 }
 
 if(z<-1700){
      mafw_renderer_get_status(MAFW_RENDERER(self->renderer),play_status,self);

 }

i think 1700 = 1,7G.
so to get an impression on how fast you have to move the phone from one point to another:
take a ball (or any other thing) and let it fall. that's 1G. make this movement 1,7 times faster and you have the edge when the song is skipped/paused. ^^

and you can see that it won't work when the proximity sensor is covered (when the phone is in a phonebag or in your pocket etc). :)

but you're right. i sometimes have to restart the app a few times to make it work. o.O

ggroen 2010-02-21 20:59

Re: Change Song by shaking phone possible?
 
Quote:

Originally Posted by DarkPand0r (Post 539988)
Its a very buggy application currently.

Shake Left/Right and it'll change the track (Next track)
Shake Up/Down and It'll Pause/Play

.

I
I've used it quite some time now and I had no problems as youu have had.
I hope all tech problems will be solved, coz I like it.

oldpmaguy 2010-02-21 21:22

Re: Change Song by shaking phone possible?
 
It's not working with MediaBox, however - too bad, it's the player of choice right now for many.

spoonbuddy 2010-02-21 21:31

Re: Change Song by shaking phone possible?
 
Just installed and I love it, thanks OP and others for pointing me in the right direction.


All times are GMT. The time now is 19:44.

vBulletin® Version 3.8.8