Project structure for push enabled apps?


  • Hi,

    I'am currently developing a Windows Store app. I want to push messages as a raw notification to my app.

    My solution has following structure:

    • Solution
    • aPager (Windows 8.1)
    • aPager Windows Phone (Windows Phone 8.1)
    • Classes (Portable)
    • PushNotificationsHelper (Windows 8.1)

    All necessary XAML files are located in the project called "aPager". All utility classes are located in project "Classes". "aPager" has a reference to "Classes", "SQLite" and "PushNotificationsHelper".

    My background tasks (class "RawNotifications") are located in "PushNotificationsHelper". After receiving a raw notification, I want to add an item to my local SQLite database and therefore I want to access a class which is located in my "aPager" project.

    The problem now is, that I cannot add "aPager" as a reference to "PushNotificationsHelper", because otherwise I would create a dependency circle (aPager > PushNotificationsHelper > aPager).

    My question is:

    Is it really necessary to put my background tasks into a different project? Why cant I add them directly to my main project ("aPager")? Or is there another way to access my main project (reflection?)?

    I tried to move the background tasks into the main project, but after that, they couldnt be executed:

    "...app is not registered for contract "Windows.BackgroundTasks" or not installed".

    Thanks for your help and greetings from Germany


    Wednesday, June 4, 2014 9:00 PM