• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How do I store sensor data based on a daily basis?

In terms of acquiring the step data, are you intending to use some kind of hardware to automatically do this, or would the user be inputting this data manually?

In terms of managing the data, there are two main aspects:-

1. Storing it. This could be achieved by creating a very simple database table containing two columns:- date, number_of_steps
2. Presenting it to the user. Can be done by presenting a ListView.

But it really depends what you mean by 'managing the data'.
 
  • Like
Reactions: Niga
Upvote 0
In terms of acquiring the step data, are you intending to use some kind of hardware to automatically do this, or would the user be inputting this data manually?

In terms of managing the data, there are two main aspects:-

1. Storing it. This could be achieved by creating a very simple database table containing two columns:- date, number_of_steps
2. Presenting it to the user. Can be done by presenting a ListView.

But it really depends what you mean by 'managing the data'.


I'm not familiar with databases in android but I have experience with MySQL and Oracle 10g,

How do I start with what you are saying? I have made some progress with getting the data from the sensor but it counts the steps from the last reboot.
 

Attachments

  • 18361204_1587122137995738_265483849_n.png
    18361204_1587122137995738_265483849_n.png
    47.7 KB · Views: 86
Upvote 0
Your first step will be a crash course in SQLite, the database included with Android. There are many web resources on this.

I'd save the total steps at the end of each day. Then you can always calculate the daily number. Of course you will have to cope with the sensor rebooting and resetting its step count.

Your initial UI is a good start, but I'd say you need a ListView. Again, many web links on how to use this as it's a common UI component.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones