Socket doesn’t throw exception in Android

Several threads from STACK OVERFLOW: We have a simple client server architecture between our mobile device and our server both written in Java. An extremely simple ServerSocket and Socket implementation. However one problem is that when the client terminates abruptly (without closing the socket properly) the server does not know that it is disconnected. Furthermore, the server can continue to write to this socket
Read more →

Android 入门笔记(三):Loader

Android 入门笔记(三):Loader
AsyncTaskLoader is a better choice for Activity-bound thread management, because it handles lifecycle changes correctly, delivering the result to the current active activity, preventing duplication of background threads, and helping to eliminate duplication of zombie activities. Leveraging Loaders Steps: Create a Loader ID Fill-in Loader Callbacks Init Loader with LoaderManager Detail: 1. Create a constant int to uniquely identify the loader; Implement tne LoaderManager.LoaderCallbacks<>
Read more →

Android 入门笔记(二): Activity

Android 入门笔记(二): Activity
Activity and Intent An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View). While activities are often presented to the user as full-screen windows, they can also be used in other ways: as floating
Read more →

Android 入门笔记(一): RecyclerView

Android 入门笔记(一): RecyclerView
暑期生产实习选了 Android 开发项目,从未接触过Android开发,对Java也只是略知一二。花了大概一个星期学习 Android 基础知识,完成了Uda
Read more →