AutoNotification Acquiring Content: Uri

Discussion in 'AutoApps' started by Cerbie, Apr 6, 2020.

  1. Cerbie

    Cerbie New Member

    Joined:
    Jun 28, 2019
    Messages:
    6
    Likes Received:
    0
    Short version:
    Is there a way to use an absolute file path to acquire the matching content uri?

    Longer version:
    My current project involves changing the sound of a lot of notification categories. Using absolute paths isn't working for me and when I select a sound from the system, it returns a content uri with a random number at the end.

    I've tried following a few examples but, haven't had any luck at all. Has anybody else run into this? If so, what was your workaround?

    Any assistance or information available would be greatly appreciated!

    Thank you,
    Ross
     
  2. meiser

    meiser New Member

    Joined:
    Oct 22, 2017
    Messages:
    1
    Likes Received:
    0
    Hi Ross,

    I'm also looking for a way to get the content uri. AutoShare just gives a full path in %asfile variables, but I need a content uri.

    Did you find a solution?

    Kind Regards,
    meiser
     
  3. Cerbie

    Cerbie New Member

    Joined:
    Jun 28, 2019
    Messages:
    6
    Likes Received:
    0
    Hello meiser,

    As of yet, I haven't found a way to automatically acquire the URI. For the time being, I had created a CSV file containing the sound files proper name and the associated URI number. When I need the URI for the sound file, I have Tasker run through the file until it finds a matching proper name.

    It works but, the whole file has to be manually updated. Also, I don't know anything about the URI media source so, I'm not sure if these URI numbers ever change. So far, it's a bit too soon for me to tell.

    -Ross
     
  4. Cerbie

    Cerbie New Member

    Joined:
    Jun 28, 2019
    Messages:
    6
    Likes Received:
    0
    Meiser,

    That looks to be pure brilliance!

    I couldn't get the resulting information to update the notification sound using AutoNotification Categories but, I am glad that it worked for your needs. Is %asfileitem the direct path to the sound file you are wanting to use?Did your result return something similar to the path listed below?

    Code (Text):
    content://net.dinglisch.android.taskerm.fileprovider/root/storage/6437-3735/FolderName/Notifications/Filename.mp3
     

Share This Page