GithubHelp home page GithubHelp logo

elebicycle's Introduction

Elebicycle

这是参加物联网竞赛时针对模拟试题写的一个练手项目,运用到了socket技术,在同一局域网内与单片机设备进行数据帧的收发,当然需要通过一个中间服务器。写的比较简陋,也有好多不太规范的代码,鉴于没真正去外边学习过真正规范的写法,应该还是可以稍微原谅些吧。主体是一个MainActivity,我想的是一个Activity搭上几个Fragment,构成一个大体框架,各个Fragment就用来处理一些显示和交互的功能,MainActivity的话就用来在底层保持与socket的连接,因为我们一旦通过socket成功连接上了,我们需要能够一直保持住这个socket,然后还能通过这个socket进行数据帧的收发,而我们也知道安卓里边MainActivity是一直保持生存周期的,除非退出应用否则不会销毁,所以放在这里边去写socket的连接,我自己觉得是最合适不过了。当然了,因为后续的一些需求,我们可以把连接成功的socket保存到全局变量中,也就是放到Viewmodel中去。

三个主Fragmen界面展示:

image

image

image

弹窗界面:

image

登陆界面:

image

注册界面:

image

elebicycle's People

Contributors

augusgabe avatar

Watchers

 avatar

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.