Solved Notification icon from local file

Discussion in 'Join' started by niawag, May 9, 2018.

  1. niawag

    niawag New Member

    Joined:
    May 9, 2018
    Messages:
    7
    Likes Received:
    0
    Hi, I'm a new Join user and this app is awesome!
    I'm still testing it to see if it can completely replace my notification system and I'm facing some issues: I want to send notifications with a custom icon, if I put an icon in png format from my gdrive, the notification shows the icon, if I try to set a notification icon from a local ressource it's not working.

    The concerned icon is exactly the same, it is stored on my NAS and on GDrive. I'm running curl from my NAS with the following command :
    curl 'https://joinjoaomgcd.appspot.com/_a...'group'&title='TITLE'&text='TEXT'&icon='$ICON
    $ICON is set with the following commands :
    Web : --> WORKING
    ICON=$(urlencode "https://lh4.googleusercontent.com/4...zUrxSulpwzF4nqUkOSBBQ2ekIkUpKNHuw=w1920-h1069")
    Local : --> NOT WORKING
    ICON=$(urlencode "file://***full path to***/flex.png")

    Am I using file URI in a bad way? Can you help me with that?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,710
    Likes Received:
    736
    When you say "Local" do you mean local on the Android device or on the NAS? :)
     
  3. niawag

    niawag New Member

    Joined:
    May 9, 2018
    Messages:
    7
    Likes Received:
    0
    Hi and thanks for your help, when I say local I mean on the NAS, is it possible that way or does the icon needs to be on the phone?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,710
    Likes Received:
    736
    The file needs to be accessible by your phone, yes. Unfortunately the NAS can't be reached by a simple file path like that. If you put it on your phone it should work.
     
  5. niawag

    niawag New Member

    Joined:
    May 9, 2018
    Messages:
    7
    Likes Received:
    0
    Ok, I thought it had to be on the device used to send the notification, I'll try to put the icons on my phone and report here!

    EDIT : it works fine on the phone, not on the other device (I guess because the icon is not accessible), is it normal? The only way to have icons on all devices is to use an icon from the web?
     
    Last edited: May 11, 2018
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,710
    Likes Received:
    736
    Yes, that's the only way :)
     
  7. niawag

    niawag New Member

    Joined:
    May 9, 2018
    Messages:
    7
    Likes Received:
    0
    So, I uploaded my icons to a personal server, I'm still sending pushes from my NAS and I can see the icon(s) on my mobile but not on my computers with chrome addon, the standard Join icon is showing in the chrome desktop notification, not the custom icon I've set (the custom icon is showing in the notification section of the chrome addon). Is it normal behavior?
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,710
    Likes Received:
    736
    The problem is that your server needs to support CORS :)
    Check here.
     
  9. niawag

    niawag New Member

    Joined:
    May 9, 2018
    Messages:
    7
    Likes Received:
    0
    Alright, thanks a lot! I'll try to do that!
     
: icon, local file

Share This Page