2015年11月30日星期一

Should I move API level to 14

It is an interesting question.  Some % is still in the list of current version fragments.

Is it a real time to switch normal development to API 14 (android 4.0) ?


2015年11月28日星期六

Permissions type: what "must" be done and "can" be done.

If we develop with SDK >= android 6.x (target 2.3 or above) then we need permission check before application starts. It is so nice for user to let them know what the application needs, however for developer is f"x", because the codes need refactoring. There're some "know-how" to do this, even with some 3rd libraries can simplify the functions like https://github.com/hotchemi/PermissionsDispatcher .


I used this library in my projects for permission check for android 6.x.  However there's two parts of permissions which we can be granted. First one are normal ones that only should be declared in mainfest like before  (PROTECTION_NORMAL). The other part of it is the ones that not only be written in mainfest but also in your Java codes to test. Like with PermissionDispatcher you must give user system build-in popup to grant next route.


Automatically granted permissions :

android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_NOTIFICATION_POLICY
android.permission.ACCESS_WIFI_STATE
android.permission.ACCESS_WIMAX_STATE
android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN
android.permission.BROADCAST_STICKY
android.permission.CHANGE_NETWORK_STATE
android.permission.CHANGE_WIFI_MULTICAST_STATE
android.permission.CHANGE_WIFI_STATE
android.permission.CHANGE_WIMAX_STATE
android.permission.DISABLE_KEYGUARD
android.permission.EXPAND_STATUS_BAR
android.permission.FLASHLIGHT
android.permission.GET_ACCOUNTS
android.permission.GET_PACKAGE_SIZE
android.permission.INTERNET
android.permission.KILL_BACKGROUND_PROCESSES
android.permission.MODIFY_AUDIO_SETTINGS
android.permission.NFC
android.permission.READ_SYNC_SETTINGS
android.permission.READ_SYNC_STATS
android.permission.RECEIVE_BOOT_COMPLETED
android.permission.REORDER_TASKS
android.permission.REQUEST_INSTALL_PACKAGES
android.permission.SET_TIME_ZONE
android.permission.SET_WALLPAPER
android.permission.SET_WALLPAPER_HINTS
android.permission.SUBSCRIBED_FEEDS_READ
android.permission.TRANSMIT_IR
android.permission.USE_FINGERPRINT
android.permission.VIBRATE
android.permission.WAKE_LOCK
android.permission.WRITE_SYNC_SETTINGS
com.android.alarm.permission.SET_ALARM
com.android.launcher.permission.INSTALL_SHORTCUT
com.android.launcher.permission.UNINSTALL_SHORTCUT

Just simply declare those permissions in AndroidManifest.xml and it will work just fine. No need to check for the permission listed above since it couldn't be revoked.

The permissions must be checked:



2015年11月20日星期五

Debug with wifi for android dev

  1. Connect device via USB and make sure debugging is working.
  2. adb tcpip 5555
  3. adb connect <DEVICE_IP_ADDRESS>:5555
  4. Disconnect USB and proceed with wireless debugging.
  5. adb -s <DEVICE_IP_ADDRESS>:5555 usb to switch back when done.

2015年11月17日星期二

IT Books 3.0 released

New version includes Google Login, Google Drive to save books,  Material Design on detail-view.

The new Google Login by new Google SigIn API  which provides easy way to connect on Google. A lot confused codes are removed when login and new thinking of App-Flow is created:

1. App start without account.
2. Some features depending on account will be first hidden or unavailable.
3. App connects to account.
4. Features will be opened.


Google Drive is a very nice place to save data background permanently.  With integration of Drive SDK Android  we can implement  backup very easily.  The SDK controls whole upload and download process as user doesn't take any care on network transactions. The only ones to do is success-handling and error-handling to info UI.


To the detail-view the CoordinatorLayout is used to replace my own implement. The standard behavior with FAB and progress-toast cooperate downloading process dynamically.  Checkout a simple sample of  CoordinatorLayout here https://github.com/chrisbanes/cheesesquare

IT Books 3.0


P.S App has a new icon now :)





2015年11月3日星期二

Topfeeds API updated

I updated API to fetch some latest tech-news from China or lots from who hosted by www.blogger.com.

SDK has also been updated.

"Developer Daily" runs internationally.

The Android-App "Developer Daily" which is known as "IT Daily News" or "Developer Daily News" has been updated with international data-source.

The first group of international data is from Android Developer Blog, Google Developer Blog, Android Official Blog, Google Official Blog, Golang Blog, Google Cloud Platform Blog. Including former Chinese source, the application is now available for west users.

The idea of "Developer Daily" is not a beautiful app with to many animation etc, the target of this gadget is only to catch latest what happening in the developer world like Android, Google , might be Apple .

Almost every developer sits on the his desk to code and code without time to read what's going on in his tech-world.  Obversely by using this small tool-kit developer can get latest information just on the way to work. To obtain latest info is more important than standby.

More an more news source will be added into.

Download:




P.S I updated API to fetch some latest tech-news from China or lots from who hosted by www.blogger.com.

SDK has also been updated.