2015년 8월 28일 금요일

iPython...

I have meet the wall for analyse the data from sensors. If I have a lot of time it is possible to make whole code.

But I have a job and that job is so busy. I heard iPython, Numpy, and pandas from my Facebook friends.

That tool is seems very good!..

My project is postponed until study these tools.

I think I can make program with python.

be happy !



2015년 8월 19일 수요일

New power saving mode in android M.

Android M adds powerful battery managing modes. One is doze and the other is app stand by.

Today google Korea campus, there is conference about these two modes.
I write summary about the conference meeting.
Mr yang and many other company people are participated in.

Because M source code is not released yet, we just talk and sharing testing results about these two modes. So following question (other company people) and answer (Mr yang from google) may have wrong informations.

So, testing your application using adb commend. Some pending events will occurs malfunction to your applications.

Q&A

1. What is doze mode?
 - Doze mode aim is for saving battery when user does not move their device for a long time. For example, if user forget to charging the phone, and slept. The phone turn to doze mode until wake up at the morning.  In the doze mode, whole app does not working at all. (some hardware interrupt and google play service can working even it is doze mode.)

2. How to prevent to enter doze?
  - There is no way to prevent by coding level.
  - The only way is using white list in battery manager and condition on developer pages.

3.  Can I detects the doze?
  -  No

4. How to return from doze to inactive? (Android app state has active (screen on), inactive (screen off), idle_pending, sensing -> ( idle -> idle_maintenance), from 2015 google IO extended. )
  -  Screen on, battery charging, move device (walking)
  - It seems that when screen off, device uses significant moving sensor for changing mode.

5. How to testing?
  - In google developer page has some errors, so testing like this :
  a. adb shell dumpsys battery unplug
  b. adb shell dumpsys deviceidle step
  c. do "b" steps, until mode changes to idle.
  d. checking state changes using following commend.
     adb shell dumpsys deviceidle

 - doze seems pending all events likes alarm, intent.. etc while doze mode is on.

 6. What is app standby mode?
 - This mode aim is for saving battery when user does not using app for a long time. For example, application does not runs by user during 2 weeks. It prevent to access battery consumption jobs likes networking. It will block background application/services to use a lot of battery.

 7. How to prevent to enter app standby
 - User cannot prevent using code.
 - There is condition on the site (user interaction, foreground, generate notification, white list on setting)

 8. How to reset the app standby?
 -  4 prevent condition will reset the app standby.

 9. Can I detect the app standby?
 - No

 10.  How to testing?
 - In google developer page has some errors.
 a. adb shell dump sys battery unplug
 b. adb shell am set-inactive <packagename> true/false
 c. checking mode using following commend
     adb shell am get-inactive <packagename>

 - app standby seems to has ability to receive alarms and service sticky  restarting but networking is not working.
 - Widget affects this mode. It means when widget is registered, app standby mode is disabled. But it is not permenent.
 - See the notification of the program also disable this mode. It is permanent disable.  


* These two mode does not killing application at all.
* When change application behaviour or UX, be mind current behaviour is not final, just look concept. (current behaviour means get some result from testing application using adb commend.)
* Many people concerns their background services.
* Some behaviour is very critically harmed when the behaviour using networking, ble. Especially, periodic networking syncing will not goes on when enter these two mode.
* Even more application user cannot concern notification UX when entering these two modes, because there is no api or intent.

So.. I hope good luck with your application testing.  In my opinion, it was fortunate these two mode not killing application.

References
https://developer.android.com/preview/features/power-mgmt.html
https://www.youtube.com/watch?v=X8eQn2E6GKw

RPI is not good handling DHT11

Hello? This is failure story about converting c code to python. There is GPIO controlling library on Python such as RPI, wiringPI. But...