AutoShare Looking for help setting up an intent to share file with an app

Discussion in 'AutoApps' started by Malakan, Mar 30, 2020.

  1. Malakan

    Malakan New Member

    Joined:
    Jul 10, 2017
    Messages:
    1
    Likes Received:
    0
    Edit: Solved using Tasker ADB Wifi action:

    am start -a android.intent.action.VIEW -d file://%filepath -t text/comma/separated-values -n come.onetwoapps.mh/.ImportCsvActivity

    'Spaces' in file path name need to be converted to '%20'
    ======

    I am looking to recreate a share function of an app I use, My Budget Book.

    My device is a Samsung S8+ on Android 9.0.
    Tasker Version 5.9.2

    Within an app called Total Commander (A file browsing app) I can select my desired .csv file, and then 'Open with', selecting My Budget Book. This opens the app and then prompts the user if they want to import the selected file.

    It is this that I wish tasker to do, without the need of the file explorer app.

    A small thing of note is that my stock file browsing app doesn't let me share the file, Total Commander does?


    About the app I'm trying to send the file to:

    Name: My Budget Book
    Package: come.onetwoapps.mh

    I contacted the developer they gave me the folowing intent filters:

    ImportCsvActivity:
    <intent-filter>
    <action android:name="android.intent.action.VIEW"/>

    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>

    <data
    android:mimeType="text/csv"
    android:pathPattern=".*\\.csv"
    android:scheme="content"
    tools:ignore="AppLinkUrlError"/>
    <data
    android:mimeType="text/csv"
    android:pathPattern=".*\\.CSV"
    android:scheme="content"
    tools:ignore="AppLinkUrlError"/>
    </intent-filter>
    <intent-filter>
    <action android:name="android.intent.action.VIEW"/>

    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>

    <data
    android:host="*"
    android:mimeType="*/*"
    android:pathPattern=".*\\.csv"
    android:scheme="file"/>
    <data
    android:host="*"
    android:mimeType="*/*"
    android:pathPattern=".*\\.CSV"
    android:scheme="file"/>
    </intent-filter>

    I have been attempting to re-create the intent in different ways, such as Java actions, I just found the AutoShare Intent Builder too, but I'm at wits' end.

    Any help is very much appreciated.

    Thank you!​
     
    Last edited: Apr 1, 2020

Share This Page