Share via - post to url. Possible?
Moderator: Martin
Share via - post to url. Possible?
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?
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
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?
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?
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?
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
-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?
Awesome!
Can we urlencode the {text} variable in some way?
Can we urlencode the {text} variable in some way?
Re: Share via - post to url. Possible?
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.
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?
Can we have a action for the opposite? Action Open share menu
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Re: Share via - post to url. Possible?
It can be done via Start Activity, action : android.intent.action.SEND
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Share via - post to url. Possible?
Thanks ^^
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Re: Share via - post to url. Possible?
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)
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.