Coder Social home page Coder Social logo

basepedo's Introduction

BasePedo

android 计步器(想尝鲜的小伙伴可以选择develop分支哦,代码更迭快,不能保证稳定,大家一起来挑bug么! )

这是一个通过android手机来模拟计步器的软件,市面上开源的计步代码不多,有些计步误差较大,我希望可以做一款计步误差小,稳定性高的计步软件,希望大家和我一起来完善。


注:本软件只适用于走路,但是跑步功能有了一些突破,相信今年一定可以更新。。。

v1.4(2020-05-23)

  • master分支与develop分支的代码改为kotlin书写,如果想看java版本的童鞋可以查看java_version分支。
  • 删除守护进程库,现正在寻觅新的守护后台的解决方案。

v1.3(2016-08-16)

  • 加入跨天清零功能。
  • 优化代码。

v1.2(2016-02-29)

  • 加入android系统提供的计步算法,根据系统支持情况自动进行选择。
  • 调整计步算法和计步精度。

v1.1(2016-01-31)

  • 为Service开启一个独立的进程进行计步,并通过messenger进行进程间传输。
  • 开启Notification,将Service变为前台应用,并在Androidmanifest.xml文 件中对Service追加action,进而提高Service的存活率。
  • 添加数据库记录与更新数据。
  • 添加广播事件,监听锁屏、关屏、关机等事件,并进行保存数据的相关操作。
  • 调整计步精度。

v1.0(2016-01-06)

  • 计步功能:暂时只测试了放在裤子口袋里计步。
  • 屏蔽功能:连续运动一定时间才开始计步,屏蔽细微移动或者驾车时震动所带来的干扰。
  • 停止运动超过5秒,便重新开启屏蔽功能。

DownLoad:

如果你有任何问题、想法或者想交个朋友,可以通过邮件联系我: [email protected],一般邮件我都是回的,当然如果你的问题太过简单,例如像怎么下载代码这些问题,请先google!

同时,欢迎大家多提Issues!

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

basepedo's People

Contributors

xfmax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basepedo's Issues

请教问题

按返回键退出,步数会回到最开始的地方,请问又解决办法吗

关于不同机型版本启动计步服务的问题。

源码:

    private void startStepDetector() {
        if (sensorManager != null && stepDetector != null) {
            sensorManager.unregisterListener(stepDetector);
            sensorManager = null;
            stepDetector = null;
        }
        sensorManager = (SensorManager) this
                .getSystemService(SENSOR_SERVICE);
        getLock(this);
        //android4.4以后可以使用计步传感器
//        int VERSION_CODES = android.os.Build.VERSION.SDK_INT;
//        if (VERSION_CODES >= 19) {
//            addCountStepListener();
//        } else {
//            addBasePedoListener();
//        }

        addBasePedoListener();
        addCountStepListener();
    }

这一段的最后两句调用, 当机型版本>4.4的时候,会同事启动两种计步器计步,步数会增加很快。还是说作者有其他的考虑?

出错

android studio 打开各总出错,原谅我安卓小白。

4.4计步的问题

4.4之后,步数取的是系统的count,但是这个count是app注册以来的总步数,并不是每天的步数,所以会导致步数一天比一天大

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.