Interpolation method for downsampling smartphone sensor data
There are several up and down-sampling techniques available. The choice between them can be made on how the data was originally sampled and what you want to do with the data.
As you are clearly on the learning curve for this sort of thing, it's worth implementing a simple linear interpolator for upsampling, a simple box-car (add N together) filter for down-sampling, and getting your whole application going end-to-end. Any time I've done a full integration experiment even with known poor components, I've learnt something I didn't expect to learn. It might even be good enough for what you want. This will get you some experience, and if the performance is falling short of what you want, some incentive and vocabulary to investigate the better methods of doing it. Cubic interpolation may appear attractive on first appearance, but it's only a bit better than linear, and it's a lot worse than the better methods.
If the data was properly band-limited when it came in, and you want to process your resulting data to an appreciable fraction of the Nyquist bandwidth, then you need to (for your use case) and it's worth doing (as the data is good) band-limited interpolation or down-sampling. This is usually done with a properly designed frequency domain FIR filter. You design the filter based on your requirements for the data. Look up Parks-McClellan or Remez design techniques.
If the data was not properly bandlimited, then you are not going to gain all that much from careful interpolation when upsampling, so you might as well use linear interpolation, or cubic if the absence of sharp changes of slope appeals to you.
When downsampling poor data, you could add together N input samples for every output sample. This is also known as a 'box-car' filter, from the shape of the impulse response. Even if N is large, it can still be done with two adds per output sample if you implement it as an IIR filter. It is a special case (the first order case) of the so-called Hogenhaur or CIC (Cascaded Integrator Comb) filter, which can efficiently do higher order filtering. This filter is commonly used as the first stage of the large rate downsampler used in delta sigma ADCs, as it is very efficient, and has 'good enough' frequency response for the first stage. If you are going to use your data only to 10% or so of Nyquist and can tolerate some response rolloff, then this filter can do the whole job.
The CIC structure can also be used to do efficient linear and higher order interpolation if you take great care of the initialisation conditions.