This is a migrated thread and some comments may be shown as answers.

WP8 Localnotification

5 Answers 103 Views
Windows Phone
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Guy Provost
Top achievements
Rank 1
Guy Provost asked on 07 Sep 2014, 10:18 PM
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!

5 Answers, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 10 Sep 2014, 01:27 PM
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.

 
0
Guy Provost
Top achievements
Rank 1
answered on 10 Sep 2014, 01:38 PM
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!
0
Sara
Top achievements
Rank 1
answered on 16 Sep 2014, 12:27 AM
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!
0
Guy Provost
Top achievements
Rank 1
answered on 16 Sep 2014, 09:55 AM
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! 
0
Anton Dobrev
Telerik team
answered on 19 Sep 2014, 08:44 AM
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.

 
Tags
Windows Phone
Asked by
Guy Provost
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Guy Provost
Top achievements
Rank 1
Sara
Top achievements
Rank 1
Share this question
or