audio recording

Post your questions and help other users.

Moderator: Martin

Post Reply
ocm
Posts: 15
Joined: 23 Mar 2014 09:08

audio recording

Post by ocm » 23 Mar 2014 09:22

Hello. I'm from Germany and may be my english is not so perfect.
But I will try.
In the case my mobile gets stolen I want to record sound using the microfone. I created a flow like this
- trigger is a sms
- action is start audio recording for a limited time
- store on sd
- mail the file to a gmail account

So far so good. When starting the audio recording unfortunately the thief will get the notification that audio is recording in the notification bar.
Is there a possibility to use audio recording in another way suppressing the notification?

Thx Olaf

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: audio recording

Post by Martin » 23 Mar 2014 11:21

Hi Olaf,

The action Start Recording Audio currently has no option to turn off the notification. Let me add this feature to the todo-list.

For now you could try following workaround:
-check that the display is off when the SMS is received (condition Screen On respectively Display eingeschaltet) and start the recording only when the display is off
--> false/Nein: -action Start Recording Audio respectively Starte Audio Aufnahme and then Remove Notification on Statusbar: All (Automagic) respectively Benachrichtigung aus Statusbar entfernen: Alle (Automagic)

Regarding your other question of the mail:
To my knowledge it's not possible to initiate a call in the background without a visual indication since the call is handled by the Android telephony app which turns the display on and shows a notification by itself.

Regards,
Martin

ocm
Posts: 15
Joined: 23 Mar 2014 09:08

Re: audio recording

Post by ocm » 23 Mar 2014 13:56

Thx for your fast answer. I will check it out.
It makes fun to play around with your app.
Regards Olaf

ocm
Posts: 15
Joined: 23 Mar 2014 09:08

Re: audio recording

Post by ocm » 24 Mar 2014 20:02

Hello Martin.
THX for your advise.
It is working fine. No Notification. Perfect.
I have one further request, if allowed.
What do I have to create, if I display is on, so the flow will not proceed, that display is switched of and the file is only send if the record has finished, if possible.
Thx for your outstanding support.
Regards Olaf

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: audio recording

Post by Martin » 24 Mar 2014 20:29

Hi,

You could either add an action Lock Device to turn the screen off with a flow. You could also wait some seconds and then check the display state again in a loop so the flow will wait with recording until the display is turned off by itself.

You can add an action Sleep: 2m (or longer) then execute action Stop Recording Audio and send the file afterwards.

Regards,
Martin

ocm
Posts: 15
Joined: 23 Mar 2014 09:08

Re: audio recording

Post by ocm » 24 Mar 2014 20:44

OK I got it nearly working.
I will send the recorded file via Email.
I do it like this in the moment.
The file is stored and send via email, next record time it will be overwritten.
I have the Idea to Store the file is with a variable triggertime dateformatHH:mmss.
Is it possible to create a action that only the newest data with the timestamp is mailed?
I hope I could express my plan somehow.#

THX

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: audio recording

Post by Martin » 25 Mar 2014 17:36

You could create the file name in a separate script action and then use this name to store the file and send the mail.
Something like this should work:
-action Script: audio_file = "/storage/emulated/0/audio_{triggertime,dateformat,yyyyMMdd_HHmmss}.m4a";
-action Start Recording Audio set File to {audio_file}
-action Mail with Gmail and set Files to attach to {audio_file}

The first action creates a local variable containing the path of the file to record (e.g. /storage/emulated/0/audio_20140325_113000.m4a).

Regards,
Martin

ocm
Posts: 15
Joined: 23 Mar 2014 09:08

Re: audio recording

Post by ocm » 25 Mar 2014 20:42

Thx I will vheck this out.
Thx for the outstanding support.

Post Reply