Need some help for a app for an experimentation (notification and record data)

Former Member
Former Member
Hello,

I am creating an application for an experimentation. I use foreruner 235 and I need some help please:

- First of all, I would send a notification (i. e., message) to the watch, it's a motivational message to urge users to do some steps everyday. At this time, I created a "view" which appears at determined hours, but it's not in backgrownd. So, when users are not in the app, the message don't appears (that's my problem).

- If the first problem can not be resolved, I would like to block the watch on my application. The users will can not be return in the watch face (for example)

- To conclude, I would save some data in a xml file or other excel file (or both) (for example count of daily steps at 10am and 6pm)

it's my code source : https://github.com/mamaaar/Wenner

Thanks for your help.

Have a nice day.
  • You should look into the features provided by the Backgrounding module. From the sound of it, you want to register your application for running at a specific time (using Background.registerForTemporalEvent(moment)) and once the application background process is started, you want the background process to start the foreground process (via Background.requestApplicationWake()).

    Travis
  • Former Member
    Former Member
    Thanks Travis,

    But my watch is forerunner 235, and I think the Background module is not compatible with this watch.
    And you know, if the solution of block the application it's possible ?

    Ammar
  • Former Member
    Former Member
    It is possible to block the default behavior of the back key, and exclude any options to exit an application. If you do this, it could only be closed by powering the device off, or charging it.

    Applications cannot achieve the same battery life duration as watchfaces, and this type of application may only get a couple of days of battery life at best. I don't believe our platform will be able to achieve the goals you have described very well.
  • Former Member
    Former Member
    Thanks Brian for information,

    If it’s possible, can you tell me how I do, please.
    I will test and if the battery’s life it’s not enough, I will try some else.
  • It's pretty simple of you have a watch-app to start with. Maybe add a display of the battery level to it, and have a timer in it to update the display like you would in the real app.

    Then just start it and let it run and don't exit. Preventing it from exiting is actually simple to do, but for this test, you don't need to do that.

    update:

    Here's an app of mine that's in the store that shows the battery level, updates the screen every second, and might work for your test. Running it without a Tempe would be a better test for what you want, as it's basically just a watchface otherwise (except the every second part)

    Time and Tempe
  • Former Member
    Former Member
    Thanks jim_m_58 for your advice and for the example of Time and Tempe app,

    but I would know like how to prevent it from exiting, because they are more participants and if they leave the app, the results of the experiment will be distorted.
  • As I said, it's simple. In your input delegate, just always return true for onBack(). But that's considered a bug in other apps.

    I WOULD NOT EVER PUT AN APP LIKE THIS IN THE APP STORE. People will download it just to check it out and get stuck in the app with no easy way out!
  • Former Member
    Former Member
    thanks jim_m_58,

    I know and I never put this app in the store, it's a app for experimentation
  • Former Member
    Former Member
    I would know how in your app Time and Tempe you display the battery's picture, please

    thank you in advance
  • I have a custom font I use for icons on watchfaces and in some other apps (like this one).