WP8 Localnotification

6 posts, 0 answers
  1. Guy Provost
    Guy Provost avatar
    6 posts
    Member since:
    Mar 2006

    Posted 07 Sep 2014 Link to this post

    We are building an app that will run on iOS, Android and WP8. Our app uses the localNotification plugin from Katzer which is a Telerik Verified Plugin. The works great on iOS and Android, but the notification dont seems to work on WP8.

    I know that the underlying system of local notification on WP8 is way different than the other two platforms. What should I do to actually have a "working" very basic notification on WP8 ?

    Looks like setting the "message" property doesn't cut it, I tried a badge... to no avail. I'm missigne something here!

    Please help I'm stuck!
  2. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 10 Sep 2014 Link to this post

    Hello Guy,

    In WP local notifications supported by the plugin are updating the live tile of the app. This is stated in the readme.md file of the plugin, and I quote: "Windows Phone 8.0 has no notification center. Instead local notifications are realized through live tiles updates". In order to update a live tile the C# native code of the plugin is sending a FlipTileData to the app which requires a TemplateFlip template for the app.

    Unfortunately, the official sample was not configured to use a Flip template and sticks to the default template used in an AppBuilder project - TemplateIconic. Please, find attached a demo project configured to use a TemplateFlip. You can examine the layout of the template in the WMAppManifest.xml file.

    In order to test the app:
    - Import the project in your favorite AppBuilder client.
    - Deploy the app to a WP device.
    - Pin the app's icon to the start menu.
    - Run the app.
    - Select an event.
    - An event will be dispatched to the app and you will be displayed an alert.
    - Close the alert and the app.
    - The Live Tile for the app will be updated.

    Could you please try this on your side and share the results?

    Also, for the purposes of this forum thread I am pasting here a sample definition for a TemplateFlip which you can further configure for use in an AppBuilder project. Use it to configure the WP configuration files for your AppBuilder project. More about the "Tokens" element can be read in the MSDN article here.
    <Tokens>
          <PrimaryToken TaskName="_default" TokenID="$ProjectName$Token">
            <TemplateFlip>
              <SmallImageURI IsResource="false" IsRelative="true">App_Resources\WP8\Tiles\Iconic\110x110.png</SmallImageURI>
              <Count>0</Count>
              <BackgroundImageURI IsResource="false" IsRelative="true">App_Resources\WP8\Tiles\Iconic\202x202.png</BackgroundImageURI>
              <Title>Local Notification Demo</Title>
              <BackContent>
              </BackContent>
              <BackBackgroundImageURI>
              </BackBackgroundImageURI>
              <BackTitle>
              </BackTitle>
              <LargeBackgroundImageURI>
              </LargeBackgroundImageURI>
              <LargeBackContent>
              </LargeBackContent>
              <LargeBackBackgroundImageURI>
              </LargeBackBackgroundImageURI>
              <DeviceLockImageURI>
              </DeviceLockImageURI>
              <HasLarge>false</HasLarge>
            </TemplateFlip>
          </PrimaryToken>
        </Tokens>


    Best regards,
    Anton Dobrev
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  3. Guy Provost
    Guy Provost avatar
    6 posts
    Member since:
    Mar 2006

    Posted 10 Sep 2014 in reply to Anton Dobrev Link to this post

    Thanks a lot Anton!

    I'll give it a try right away and come back to you. I guess I was expecting to find this kind of info on the plugin readme or documentation, I must have miss it! 

    Thanks, everything seems solid at first sight I'll give it a go!
  4. Sara
    Sara avatar
    1 posts
    Member since:
    Sep 2014

    Posted 15 Sep 2014 Link to this post

    I just wondered if the fix Anton gave you worked for you, Guy? I just joined this site to find out the same answer, searched and found your post! Spooky... It works fine on iOS and Android  but no joy on WP8 yet... I've tried several fixes and am just about to try Anton's... I'm hoping that you haven't posted since as it worked for you... So... Fingers crossed!
  5. Guy Provost
    Guy Provost avatar
    6 posts
    Member since:
    Mar 2006

    Posted 16 Sep 2014 in reply to Sara Link to this post

    Ooops, just remembered that I forgot to follow up on this... too many things to do!

    Yes, it works, the code is also a real eye opener on how to do notification on these 3 platform. Thanks a lot Anton!

    You have to deal with the fact that "notification" on WP8 is limited compared to iOS and Android. If the user doesn't watch the tiles, tough luck.

    We also offer SMS as a feature to alert the user about the event coming up. We considered push notification (which WP8 fully supports) in the near future.

    Good luck, let me know how it turned out! 
  6. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 19 Sep 2014 Link to this post

    Hello Guy,

    Thank you for getting back to us.

    Actually, due to this and some other reasons we decided to pull the official WP8 support from the Telerik Marketplace version of the plugin, that is why the sample was not functioning in WP. We plan to add the WP8 support again in the future once the above issues are resolved.

    I am happy that the current workaround did the job on your side.

    Let me know if you have any further questions or feedback.

    Best regards,
    Anton Dobrev
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top