Page 1 of 2

Share via - post to url. Possible?

Posted: 27 Sep 2015 15:43
by Taapo
Is it possible to visit a page in a browser, select the "share via" action feom the menu, choose automagic from the list and have the link posted to a custom url?

Re: Share via - post to url. Possible?

Posted: 27 Sep 2015 17:47
by Martin
Hi,

The next version of Automagic (1.29) supports a new trigger Send/Share Intent Received for this purpose. You can download a preview of the next version in the EAP forum.

Regards,
Martin

Re: Share via - post to url. Possible?

Posted: 29 Sep 2015 10:18
by Taapo
Looks awesome, and I was able to open a URL.

Can somebody help me pass the current URL (if you are in a webbrowser) pass to the open URL command? Or am I misinterpreting the possibilities?

Re: Share via - post to url. Possible?

Posted: 29 Sep 2015 12:52
by Martin
You could build a flow like this:

-trigger Send/Share Intent Received
-action Open URL in Browser: {text}

You can use the Share-button in the browser and pick Automagic Send/Share Intent Received from the list which will execute the flow. The trigger makes some variables available to the flow. Check out the help page of the trigger and scroll to the section 'Supplied Variables'. In such cases it's often also helpful to build a test flow first to inspect the available variables and the contained values:

-trigger Send/Share Intent Received
-condition Debug Dialog

In case of Chrome, the URL becomes available in variable text. {text} will be replaced with the contents of the variable text when the action is executed.

Regards,
Martin

Re: Share via - post to url. Possible?

Posted: 30 Sep 2015 07:13
by Taapo
Awesome!

Can we urlencode the {text} variable in some way?

Re: Share via - post to url. Possible?

Posted: 01 Oct 2015 11:25
by Martin
Yes, you can use {encodeURL(text)} (encodes spaces to %20) or {encodeURLForm(text)} (encodes spaces to +).
Also see the documentation about script functions in the help page of action Script or by using the Function-button in action Script.

Re: Share via - post to url. Possible?

Posted: 01 Nov 2019 03:33
by Bluscre
Can we have a action for the opposite? Action Open share menu

Re: Share via - post to url. Possible?

Posted: 03 Nov 2019 18:45
by Desmanto
Bluscre wrote:
01 Nov 2019 03:33
Can we have a action for the opposite? Action Open share menu
It can be done via Start Activity, action : android.intent.action.SEND

Re: Share via - post to url. Possible?

Posted: 04 Nov 2019 02:54
by Bluscre
Thanks ^^

Re: Share via - post to url. Possible?

Posted: 04 Nov 2019 08:22
by Bluscre
Sadly it didnt work for me

Code: Select all

04.11.2019 09:21:35.197 [Open URLs] Action 'Start Activity: android.intent.action.SEND {data_string} ' Could not start activity using intent: Intent { act=android.intent.action.SEND dat=https://automagic4android.com/... flg=0x10000000 }
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND dat=https://automagic4android.com/... flg=0x10000000 }
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1809)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1523)
	at android.app.ContextImpl.startActivity(ContextImpl.java:682)
	at android.app.ContextImpl.startActivity(ContextImpl.java:664)
	at android.content.ContextWrapper.startActivity(ContextWrapper.java:331)
	at ch.gridvision.ppam.androidautomagic.model.a.gt.a(SourceFile:386)
	at ch.gridvision.ppam.androidautomagic.model.a.d$1.b(SourceFile:416)
	at ch.gridvision.ppam.androidautomagiclib.util.cj$1$1.run(SourceFile:52)
	at android.os.Handler.handleCallback(Handler.java:815)
	at android.os.Handler.dispatchMessage(Handler.java:104)
	at android.os.Looper.loop(Looper.java:207)
	at android.app.ActivityThread.main(ActivityThread.java:5765)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)

04.11.2019 09:21:35.212 [Open URLs] End executing action 'Start Activity: android.intent.action.SEND {data_string} ' and exception No Activity found to handle Intent { act=android.intent.action.SEND dat=https://automagic4android.com/... flg=0x10000000 }
04.11.2019 09:21:35.213 [Open URLs] Flow ends execution due to errors
04.11.2019 09:21:35.213 [Open URLs] Error:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND dat=https://automagic4android.com/... flg=0x10000000 }
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1809)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1523)
	at android.app.ContextImpl.startActivity(ContextImpl.java:682)
	at android.app.ContextImpl.startActivity(ContextImpl.java:664)
	at android.content.ContextWrapper.startActivity(ContextWrapper.java:331)
	at ch.gridvision.ppam.androidautomagic.model.a.gt.a(SourceFile:386)
	at ch.gridvision.ppam.androidautomagic.model.a.d$1.b(SourceFile:416)
	at ch.gridvision.ppam.androidautomagiclib.util.cj$1$1.run(SourceFile:52)
	at android.os.Handler.handleCallback(Handler.java:815)
	at android.os.Handler.dispatchMessage(Handler.java:104)
	at android.os.Looper.loop(Looper.java:207)
	at android.app.ActivityThread.main(ActivityThread.java:5765)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)