Can AppGyver access motion sensors? Action provoked by a phone shake

Hello everyone,

I’m currently looking into using AppGyver for a relaunch of an app that already exists but is only supported for iOS and has quite a few hours on the counter. I have done a bit of research online and here on the AppGyver Forum, but haven’t been able to find a definitive answer for my questions. So here it goes.

We have a couple of thousand mottos or short sentences at hand. Following are the main functions, that we are trying to realize:

  • Show one motto for every user on the homescreen that changes daily
  • Shaking the phone showing a motto (including a sound of a rolling dice) (!)
  • Choosing a lucky number showing a motto
  • Being able to swipe through all available mottos
  • The user should be able to save a motto to individual lists

I suppose the sticking point is the shaking of the phone. Is it possible to access the motion sensors with AppGyver? As far as I understand the rest should be able to be done easily.

Has anyone have experience with this kind of thing?

I hope some of you can shed a light on this. I’m very much looking forward to your replies.

Thanks!

Julian

Hi Julian, welcome to the community!

You can access the phone accelerometer, gyroscope and other sensor variables in Composer, check out the docs for more detailed information.

The rest of what you described should be very much doable too, using for example RANDOM_INTEGER_BETWEEN formula function (docs) and Play audio flow function (docs).

The only thing from your list that stood out to me as requiring some creativity is the swiping through mottos. Unfortunately Composer doesn’t currently recognize swipe events, but you could implement that using tap events too. :slight_smile:

Hope this helped!

Hi Mari,

thank you for your reply!

This definitely helped. I appreciate it!

Julian

1 Like

Hi,
It’s possible obtain the information that sensors send to the application. So, you can solve the problem using a delay after event page focused and then create a loop win other instructions conected agai with this delay.

With this easy trick you can get the information in real time (or with a 1 ms of delay)

Regards
Enrirc