Can AutoMagic Do This??

General discussions about Automagic and automation in general

Moderator: Martin

Inked
Posts: 15
Joined: 19 Feb 2016 20:19

Can AutoMagic Do This??

Post by Inked » 19 Feb 2016 20:27

Hi guys

I have a android rear view mirror that has a built in FM transmitter.

What I need AutoMagic to do is turn this on as soon as the device boots up.

Can this be done as I can't see any trigger for when a device boots up?

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Can AutoMagic Do This??

Post by kintrupf » 19 Feb 2016 20:48

Inked wrote:Hi guys

I have a android rear view mirror that has a built in FM transmitter.

What I need AutoMagic to do is turn this on as soon as the device boots up.

Can this be done as I can't see any trigger for when a device boots up?
Use the Trigger Automagic Startup and set the option Start after boot in Automagics preferences.

Inked
Posts: 15
Joined: 19 Feb 2016 20:19

Re: Can AutoMagic Do This??

Post by Inked » 19 Feb 2016 21:34

kintrupf wrote:
Inked wrote:Hi guys

I have a android rear view mirror that has a built in FM transmitter.

What I need AutoMagic to do is turn this on as soon as the device boots up.

Can this be done as I can't see any trigger for when a device boots up?
Use the Trigger Automagic Startup and set the option Start after boot in Automagics preferences.

Thanks for the reply ;)

That should get the trigger after the device has bitted up but how should I go about enabling the fm transmitter?

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

Re: Can AutoMagic Do This??

Post by Martin » 20 Feb 2016 10:59

Hi,

I'm not aware about an official API to turn an FM transmitter on. You could try to use action Control UI to turn it on.

Regards,
Martin

Inked
Posts: 15
Joined: 19 Feb 2016 20:19

Re: Can AutoMagic Do This??

Post by Inked » 20 Feb 2016 20:22

Martin wrote:Hi,

I'm not aware about an official API to turn an FM transmitter on. You could try to use action Control UI to turn it on.

Regards,
Martin


Thanks for the reply ;)

I tried using the Control UI but every time I click the Show Overlay Control I get an error saying "Unfortunately AutoMagic Premium Has Stopped ", this could just be something to do with the limited android OS aso I can't even get inot developer's options.


On the other hand although there is an icon to launch the Fm transmitter settings I've got a feeling it's some sort of system setting.

For example, if I click the Fm transmitter icon to open the settings and then click the power button (looks like a power symbol) to turn the Fm transmitter on. I can then close it down from the background running apps and the Fm transmitter still stays turned on.

Do you think there's another way to turn it on without the control ui?

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

Re: Can AutoMagic Do This??

Post by Martin » 22 Feb 2016 19:00

Does this device have Google Play store installed or are you sideloading Automagic onto this device?

Maybe action Set System Setting could work (but unlikely). Maybe the UI just starts a service using an intent. Do you have the possibility to get a system log of this device (via USB debugging or using 'take bug report' from system settings->developer options)?

Inked
Posts: 15
Joined: 19 Feb 2016 20:19

Re: Can AutoMagic Do This??

Post by Inked » 22 Feb 2016 20:49

Martin wrote:Does this device have Google Play store installed or are you sideloading Automagic onto this device?

Maybe action Set System Setting could work (but unlikely). Maybe the UI just starts a service using an intent. Do you have the possibility to get a system log of this device (via USB debugging or using 'take bug report' from system settings->developer options)?
Thanks again for the reply ;)

Yes it does have Google play, that's how I installed it.

How would I use the set system setting?

I'm sure i looked in one of the system triggers and the fm transmitter wasn't there but ill have another look.

Unfortunately there's no developer options (and you can't just keep clicking build to get them).

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

Re: Can AutoMagic Do This??

Post by Martin » 23 Feb 2016 15:23

When Automagic crashes after invoking Show Overlay Control, can you please submit the error to Google Play when such an option exists in the dialog? If not, does Automagic show a dialog to send a mail containing the crash report when Automagic is started the next time? I would like to get this crash fixed if possible.

You can create an action Set System Setting and click the [...]-button of the Name-field to list all known values stored in the settings database of the system. Maybe you can find a setting that contains fm_transmitter or something similar. Values of 1 usually mean on, 0 usually means off.

Inked
Posts: 15
Joined: 19 Feb 2016 20:19

Re: Can AutoMagic Do This??

Post by Inked » 25 Feb 2016 18:31

Thanks again for your reply.

Whenever it's crashes I always let it send the report.

And I could not find anything relating to the fm transmitter :-(

I found someone that had made an apk file to turn on the fm transmitter on a similar device, so I contacted them and asked them what exactly they had changed and told them what I was trying to do but unfortunately I don't think they understood English very well so after a lot of messages I ask them what was contained in the AndroidManifest.xml


And he sent me this:



<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microntek.radio">
<application android:icon="@drawable/ic_radio" android:label="@string/app_name">
<service android:enabled="true" android:name="com.microntek.radio.RadioService" android:persistent="true">
<intent-filter>
<action android:name="com.microntek.radio.radioService"/>
</intent-filter>
</service>
<activity android:excludeFromRecents="true" android:label="@string/app_name" android:launchMode="singleTask" android:name="com.microntek.radio.RadioActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
</manifest>


Does this help in any way?

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

Re: Can AutoMagic Do This??

Post by Martin » 25 Feb 2016 19:53

The crash reports did not make it to Google Play yet. However, this can be delayed so maybe the crash reports will show up in a few days.

The manifest does not contain any information that could be directly used to activate the transmitter. What's the exact model name of this device? Maybe I can find something on the internet about it.

Post Reply