现在的位置: 首页 > 移动开发
0℃
2013年11月09日 移动开发 ⁄ 被围观 5,849+
本文展示了怎么样来利用Flask框架来搭建树莓派的服务器,然后通过web方式来控制物理硬件的开关~。背后的实现原理是,在树莓派的平台上利用python语言开发包,开发IO通信程序,然后通过Flask框架,以web的方式展现出来,那么,这样就可以通过pc的web浏览器或者手持设备的web浏览器来控制实际的硬件开发,实现了物联网的远程控制。 The following is an adapted excerpt from Getting Started with Raspberry Pi. I especially like this section of the book because it shows off one of the strengths of the Pi:...
阅读全文
0℃
2013年09月28日 移动开发 ⁄ 被围观 5,528+
本文展示了怎样来利用谷歌的云推送系统Google Cloud Messaging (GCM)来推送消息到Android手机,目前支持两大类消息,一类是“send-to-sync”,即发送一个触发指令,格式为一个自定义的字符串,例如 "syncTime"表示同步时间,那么Android客户端收到此消息的话,需要启动一个后台线程,同设定的Server进行交互,获取最新的时间;还有一类是“message with payload”,即发送一条消息,消息中可包含正文内容,比如message.addData("new_time", curTime),则可以通过键值"new_time"获取到具体的时间。 Pushing data has a ...
阅读全文
0℃
2013年09月07日 移动开发 ⁄ 被围观 3,521+
在Android的开发过程中,经常需要用到后台服务来完成非UI的工作,比如文件的下载,那么本文提到的IntentService便是一个很好的选择,可以利用它的队列机制,放入一系列的任务,然后系统会依次启动单独的Service来执行任务,免去了自己维护队列的麻烦。 In the new category Read the code I’m going to show the internals of the Android framework. Reading the code of the framework can give you a good impression about what’s going on under the hood. In addition to that knowing how the framework de...
阅读全文
0℃
2013年08月22日 移动开发 ⁄ 被围观 3,880+
什么是ViewOverlay? ViewOverlay is a class that we can find in Android since its version 4.3 (API version 18) that provides a transparent layer on top of a View, to which you can add visual content and that does not affect the layout hierarchy. It always has the same size and position as its host view, allowing you to add content over that view. 运行效果 红色部分:使用了 按钮的 parent-parent layout (the main, first-level, layout) ViewGroupOverlay,所以可以穿越整个画面。 ...
阅读全文
0℃
2013年08月22日 移动开发 ⁄ 被围观 3,826+
Android的网络编程大家基本都熟悉,Http的Get,Post请求与其他语言的开发大同小异,可以采用Android自带的网络开发包,也可以采用Apache的开源网络编程包。本文介绍一个支持SPDY的开发包OkHttp,关于SPDY的知识,大家可以从维基百科和百度百科上面找到,基本就是增强版的Http。 OkHttp is an HTTP client that’s efficient by default: SPDY support allows all requests to the same host to share a socket. Connection pooling reduces request latency (if SPDY isn’t available). Transparent GZIP shrinks ...
阅读全文
0℃
2013年08月21日 移动开发 ⁄ 被围观 3,354+
想知道Android系统的关系过程么??? 本文将会展示一个完整的关机处理流程。 What happened when I long press power button ? What is shutdown sequence ? How is it different from desktop linux shutdown sequence? How to change shutdown menu ? Many questions pop-up in mind when we think about Android shutdown sequence. Before you read about shutdown sequence I suggest you to read about boot sequence article . Android is linux based open source operating system, x86 (x86 is a serie...
阅读全文
0℃
2013年08月21日 移动开发 ⁄ 被围观 3,289+
So, you've decided to switch your Android library project to the new hotness (Gradle, Android's new build system)? About to release a new Android library? Read on. 1. What is apklib? apklib is a way to bundle an Android library project. Many Android developers thought the existing Android build system, based on Ant, was insufficient. Maven is arguably a better build system, so the android-maven-plugin was created, to let Maven users build their Android projects. Maven down...
阅读全文
0℃
2013年08月21日 移动开发 ⁄ 被围观 3,061+
在开发Android的过程中,我们经常会用到SQLite进行资料的存储,本文给出了一种自定义Loader的方式,直接访问SQLite的API进行交互。 Today we’ll discuss about custom loaders in Android. Loaders have been introduced from Android 3.0 but we can also use loaders in prior versions of Android starting from Android 1.6 with the help of Android compatibility library. In this tutorial we won’t discuss the basics of loader which is vastly available in the Internet. A very good tutorial on lo...
阅读全文
×
腾讯微博