AutoNotification Passing something from a notification to a profile

Discussion in 'AutoApps' started by Rich Wallace, Oct 21, 2017.

  1. Rich Wallace

    Rich Wallace Member

    Joined:
    Apr 10, 2015
    Messages:
    42
    Likes Received:
    1
    I have a task which is checking Reddit, and creates a notification of certain criteria are met.

    I want to be able to click on said notification and open the Reddit post.

    I can't figure out how to pass the link from the notification to the auto apps command.
    Tasks below.

    Code (Text):
    Villa (83)
        A1: AutoTools Json Read [ Configuration:Json: https://www.reddit.com/r/soccerstreams/new/.json
    Fields: data.children.data.created_utc(),data.children.data.title(),data.children.data.permalink(),data.children.data.thumbnail()
    Query: permalink
    Variable Name: postid(),title(),link(),icon()
    Separator: , Timeout (Seconds):60 ]
        A2: Variable Set [ Name:%array_pos To:%title(#?*Chelsea*) Recurse Variables:Off Do Maths:Off Append:Off ]
        A3: Flash [ Text:%link(%array_pos) Long:On ]
        A4: If [ %title() ~ *chelsea* ]
        A5: Flash [ Text:Yes Long:Off ]
        A6: AutoNotification [ Configuration:Title: Live football game
    Text: %title(%array_pos)
    Action on Touch: checkvillastream=:=link(%array_pos)
    Url: %link(%array_pos)
    Icon: /storage/emulated/0/Download/Aston_villa_logo16.png
    Status Bar Icon: ic_action_like
    Status Bar Icon Manual: /storage/emulated/0/Download/Aston_villa_logo16.png
    Status Bar Text Size: 16 Timeout (Seconds):20 ]
        A7: [X] Send Intent [ Action:android.intent.action.VIEW Cat:Default Mime Type: Data:https://www.reddit.com%link(%array_pos) Extra: Extra: Extra: Package:com.laurencedawson.reddit_sync Class: Target:Activity ]
        A8: Else
        A9: Flash [ Text:No Long:Off ]
        A10: End If
        A11: Flash [ Text:%array_pos
    %title(%array_pos) Long:Off ]


    Profile: Reddit Open (13)
        Event: AutoApps Command [ Configuration:Command Filter: checkvillastream=:=
    Variable Names: link ]
    Enter: Anon (178)
        A1: Flash [ Text:Opening...

    %link Long:Off ]
        A2: Send Intent [ Action:android.intent.action.VIEW Cat:Default Mime Type: Data:https://www.reddit.com%link Extra: Extra: Extra: Package:com.laurencedawson.reddit_sync Class: Target:Activity ]

    Sent from my SM-G950F using Tapatalk
     
    Last edited by a moderator: Oct 23, 2017
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    In the Reddit Open profile you can use the "Browse URL" action. Makes it easier :) But what happens when you try that?
     

Share This Page