2015年11月27日 星期五
[Problem] Can't load GNU STL lib (HTC Sense 6.0 , Android 5.0.2, HTC SDK API 6.55)
HTC Sense 6.0
Android 5.0.2
HTC SDK API 6.55
FAQ: Why do I get UnsatisfiedLinkError?http://developer.android.com/intl/zh-tw/training/articles/perf-jni.html
[Android] 使用adb指令http://style77125tech.pixnet.net/blog/post/17556680-%5Bandroid%5D-%E4%BD%BF%E7%94%A8adb%E6%8C%87%E4%BB%A4
error messages
===========================
11-27 16:43:05.044 15676-15676/? E/art: ----- class 'Lcom/facebook/breakpad/BreakpadManager;' cl=0x12cf6fc0 -----
11-27 16:43:05.044 15676-15676/? E/art: objectSize=420 (412 from super)
11-27 16:43:05.044 15676-15676/? E/art: access=0x0008.0001
11-27 16:43:05.044 15676-15676/? E/art: super='java.lang.Class<java.lang.Object>' (cl=0x0)
11-27 16:43:05.044 15676-15676/? E/art: vtable (0 entries, 11 in super):
11-27 16:43:05.044 15676-15676/? E/art: direct methods (3 entries):
11-27 16:43:05.044 15676-15676/? E/art: 0: void com.facebook.breakpad.BreakpadManager.a(android.content.Context, boolean)
11-27 16:43:05.044 15676-15676/? E/art: 1: void com.facebook.breakpad.BreakpadManager.b(android.content.Context, boolean)
11-27 16:43:05.044 15676-15676/? E/art: 2: void com.facebook.breakpad.BreakpadManager.install(java.lang.String)
11-27 16:43:05.044 15676-15676/? E/art: static fields (2 entries):
11-27 16:43:05.044 15676-15676/? E/art: 0: java.lang.String com.facebook.breakpad.BreakpadManager.a
11-27 16:43:05.044 15676-15676/? E/art: 1: java.io.File com.facebook.breakpad.BreakpadManager.b
11-27 16:43:05.044 15676-15676/? E/art: Failed to register native method com.facebook.breakpad.BreakpadManager.getMinidumpFlags()J in /data/app/com.instagram.android-1/base.apk
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: Can't load GNU STL lib
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: java.lang.UnsatisfiedLinkError: Bad JNI version returned from JNI_OnLoad in "/data/app/com.instagram.android-1/lib/arm/libbreakpad.so": 0
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at java.lang.Runtime.load(Runtime.java:331)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at java.lang.System.load(System.java:982)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.facebook.soloader.c.a(DirectorySoSource.java:61)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.facebook.soloader.c.a(DirectorySoSource.java:32)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.facebook.soloader.h.a(SoLoader.java:275)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.facebook.soloader.h.a(SoLoader.java:232)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.facebook.breakpad.BreakpadManager.b(BreakpadManager.java:67)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.facebook.breakpad.BreakpadManager.a(BreakpadManager.java:96)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.instagram.android.app.InstagramApplicationForMainProcess.ensureJNIPrerequisites(InstagramApplicationForMainProcess.java:319)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.instagram.android.app.InstagramApplicationForMainProcess.onCreate(InstagramApplicationForMainProcess.java:162)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.instagram.app.InstagramAppShell.onCreate(InstagramAppShell.java:53)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4947)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at android.app.ActivityThread.access$1500(ActivityThread.java:144)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at android.os.Handler.dispatchMessage(Handler.java:102)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at android.os.Looper.loop(Looper.java:155)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at android.app.ActivityThread.main(ActivityThread.java:5696)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at java.lang.reflect.Method.invoke(Native Method)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at java.lang.reflect.Method.invoke(Method.java:372)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
11-27 16:43:05.054 15676-15676/? E/InstagramApplicationForMainProcess: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
11-27 16:43:05.124 941-941/? E/WifiTrafficPoller: TRAFFIC_STATS_POLL true Token 2628 num clients 25
11-27 16:43:05.124 941-941/? E/WifiTrafficPoller: packet count Tx=5995 Rx=6499
11-27 16:43:05.174 941-941/? E/WifiTrafficPoller: ADD_CLIENT: 26
2015年11月24日 星期二
[test] motion detection (192.168.18.149)
time lapse
set
get
recycle recording enable
recycle recording disable
==========================================
recycle recording
sethttp://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=record:set:5:0:
get
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=record:get:5
recycle recording enable
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=record:set:0:1
recycle recording disable
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=record:set:0:0
======
head count
set
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:3:2:581,52,581,288;167,149,508,149;136,305,381,305:
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:4:2:581,52,581,288;167,149,508,149;136,305,381,305:
get
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:get:3
==========================================
motion
set
motion enablehttp://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:0:1
motion disable
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:0:0
--------------------------------------------------------------------
triger time
set
10 sec
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:1:5
15 sec
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:1:15
30 sec
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:1:30
get
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:get:1
-----------------------------------------------------------------------
all regions(need to restart)
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:3:0:20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95;20,95:
all regions(set directly)
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:4:0:3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90;3,90:60:000102030405060708091011143314151617181920212223:
當all regions與 multi regions相互切換,必須下停止與開啟指令,all regions才會生效
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:0:0
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:0:1
----------------------------------------------------------------------
multi regions
(VGA 640*360, 不論 liveview 解析度為何,送出的x, y座標階從(0,0)到(640,360))
A: http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:3:1:0,0,0,0,area1,20,95;0,0,320,180,area2,20,95;0,0,0,0,area3,20,95;0,0,0,0,area4,20,95;0,0,0,0,area5,20,95:
B: http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:3:1:0,0,0,0,area1,20,95;320,0,640,180,area2,20,95;0,0,0,0,area3,20,95;0,0,0,0,area4,20,95;0,0,0,0,area5,20,95:
C: http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:3:1:0,0,0,0,area1,20,95;0,180,320,360,area2,20,95;0,0,0,0,area3,20,95;0,0,0,0,area4,20,95;0,0,0,0,area5,20,95:
D: http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:3:1:0,0,0,0,area1,20,95;320,180,640,360,area2,20,95;0,0,0,0,area3,20,95;0,0,0,0,area4,20,95;0,0,0,0,area5,20,95:
當all regions與 multi regions相互切換,必須下停止與開啟指令,multi regions才會生效
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:0:0
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:set:0:1
---------------------
1 zone
0,0,320,180,area1,20,95;0,0,0,0,area2,20,95;0,0,0,0,area3,20,95;0,0,0,0,area4,20,95;0,0,0,0,area5,20,95:
2 zone
0,0,0,0,area1,20,95;320,0,640,180,area2,20,95;0,0,0,0,area3,20,95;0,0,0,0,area4,20,95;0,0,0,0,area5,20,95:
---------------------
liveview
setting
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=record:set:4:0:
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=record:set:4:1:
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=record:set:4:2:
getting
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=getsetting
rotation
-----------------------------
get
motion detection status(enable/disable)http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:get:0
multi regions status(all positions)
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=motion:get:3
======================
google drive
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=google-drive_auth
======================
getsetting
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=getsetting
snapshot
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=snapshot
thumbnailhttp://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=thumbnail
wifiscan
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=wifiscan
time zone synchronize
http://192.168.18.158/cgi-bin/cgi-cmd.cgi?command=settime:2015-05-15,16:11:12
2015年11月23日 星期一
[Android] onClick & class
// image view click listenerphotoView.setOnClickListener(new OnImageClickListener(position));
class OnImageClickListener implements View.OnClickListener { int _postion; // constructor public OnImageClickListener(int position) { this._postion = position; } @Override public void onClick(View v) { // on selecting grid view image // launch full screen activity // Intent i = new Intent(_activity, FullScreenViewActivity.class);// i.putExtra("position", _postion);// _activity.startActivity(i);// Log.e("_postion", "" + _postion); } }
2015年11月19日 星期四
[Video] url for test
https://ia802308.us.archive.org/34/items/RepCompulsion_USA_2004/RepCompulsion_USA_2004_512kb.mp4
https://archive.org/download/ksnn_compilation_master_the_internet/ksnn_compilation_master_the_internet_512kb.mp4
https://ia601401.us.archive.org/27/items/101_D_2004/101_D_2004_512kb.mp4
https://ia802308.us.archive.org/34/items/RepCompulsion_USA_2004/RepCompulsion_USA_2004_512kb.mp4
https://ia700308.us.archive.org/3/items/manufacturing_consent/Noam_Chomsky-Manufacturing_Consent_512kb.mp4
https://ia600407.us.archive.org/10/items/Buddhas_Maler_D_2004/Buddhas_Maler_D_2004_512kb.mp4
// private String video_url = "https://ia802308.us.archive.org/34/items/RepCompulsion_USA_2004/RepCompulsion_USA_2004_512kb.mp4";// private String video_url = "http://will.net63.net/video/"; // private String video_url = "http://aws.px.com.tw/video/";// private String[] video_name = new String[]{"test0.mp4","test1.mp4","test2.mp4","test3.mp4","test4.mp4",// "test5.mp4","test6.mp4","test7.mp4","test8.mp4","test9.mp4",// "test10.mp4","test11.mp4","test12.mp4","test13.mp4","test14.mp4",// "test15.mp4"// };
2015年11月17日 星期二
2015年11月11日 星期三
2015年11月6日 星期五
[android] Android ListView滑动过程中图片显示重复错位闪烁问题解决
Android ListView滑动过程中图片显示重复错位闪烁问题解决http://www.trinea.cn/android/android-listview-display-error-image-when-scroll/
[android] download manager
Android系统下载管理DownloadManager功能介绍及使用示例http://www.trinea.cn/android/android-downloadmanager/
[Problem] Android studio Gradle build and compiler speed is slow
Android studio Gradle build speed is slowhttp://www.feelzdroid.com/2015/10/android-studio-gradle-build-speed-very-slow.html
2015年11月3日 星期二
[Time] 玩转Android---UI篇---DatePicker,TimePicker(日期和时间) 轉貼
玩转Android---UI篇---DatePicker,TimePicker(日期和时间)http://hualang.iteye.com/blog/963994
[Problem] Change Datepicker dialog color for Android 5.0
Change Datepicker dialog color for Android 5.0http://stackoverflow.com/questions/28738089/change-datepicker-dialog-color-for-android-5-0
2015年11月2日 星期一
[Android Studio] The import org.apache.http.client cannot be resolved error when i update sdk(轉貼)
http://stackoverflow.com/questions/32153318/httpclient-wont-import-in-android-studio
http://stackoverflow.com/questions/32676049/the-import-org-apache-http-client-cannot-be-resolved-error-when-i-update-sdk-to
http://stackoverflow.com/questions/9767952/how-to-add-parameters-to-httpurlconnection-using-post/29561084#29561084
https://developer.android.com/intl/zh-tw/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
2015年10月28日 星期三
[Google drive] Go language
Permanently delete file from google drive
http://stackoverflow.com/questions/25749906/permanently-delete-file-from-google-drive
delete file
https://developers.google.com/drive/v2/reference/files/delete
file list
https://developers.google.com/drive/v2/reference/files/list
下圖一欄位 q 值為: 'folder id' in parents ( '0B9OFuGhAGrF6NEZhWHBBd1FjSFE' in parents ),執行後結果可列出所有檔案,如圖二。
圖一 |
圖二 |
2015年10月21日 星期三
[Problem] android google drive Insufficient Permission for files().insert()
Google PHP Client API: Insufficient Permission
2015年10月19日 星期一
[Android] google drive test (UserRecoverableAuthIOException)
http://gmariotti.blogspot.tw/2013/04/simple-actions-with-google-drive-api-v2.html
https://github.com/gabrielemariotti/androiddev/tree/master/GoogleAccount
create folder DRIVE_METADATA_READONLY UserRecoverableAuthIOException
2015年10月14日 星期三
[Android] set current time
//SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日HH:mm:ss"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd,HH:mm:ss"); Date curDate = new Date(System.currentTimeMillis()) ; // 獲取當前時間 String now_time = formatter.format(curDate);reference: http://bibby1101.pixnet.net/blog/post/44759449-%E3%80%8Aandroid%E3%80%8B%E6%8A%93%E5%8F%96%E6%89%8B%E6%A9%9F%E4%B8%8A%E6%99%82%E9%96%93%E8%B3%87%E8%A8%8A
2015年10月12日 星期一
[Android] Listview & progressbar
The Way to Update progress bar in ListView :Android
http://isms-blog.logdown.com/posts/65188-the-way-to-update-progress-bar-in-listviewandroid
Handler 如何操作 Runnable
http://imax-live.blogspot.tw/2012/12/handler-runnable.html
2015年10月6日 星期二
[Android] Text size and different android screen sizes
reference: http://stackoverflow.com/questions/9877946/text-size-and-different-android-screen-sizes
@forcelain I think you need to check this Google IO Pdf for Design. In that pdf go to Page No:77 in which you will find how there suggesting for using dimens.xml for different devices of android for Example see Below structure :
res/values/dimens.xml
res/values-small/dimens.xml
res/values-normal/dimens.xml
res/values-large/dimens.xml
res/values-xlarge/dimens.xml
for Example you have used below dimens.xml in values.
<?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="text_size">18sp</dimen> </resources>
In other values folder you need to change values for your text size .
other reference:
http://blog.csdn.net/kazeik/article/details/82687212015年9月18日 星期五
[Android] Is it possible to use BitmapFactory.decodeFile method to decode a image from http location? (轉貼)
Is it possible to use BitmapFactory.decodeFile method to decode a image from http location?
ImageView iv = new ImageView(context); try{ String url1 = "http://<my IP>/test/abc.jpg"; URL ulrn = new URL(url1); HttpURLConnection con = (HttpURLConnection)ulrn.openConnection(); InputStream is = con.getInputStream(); Bitmap bmp = BitmapFactory.decodeStream(is); if (null != bmp) iv.setImageBitmap(bmp); else System.out.println("The Bitmap is NULL"); } catch(Exception e) { }Do not forget to disconnect (and hereby release the input stream resource), e.g.
finally { if (con != null) { con.disconnect(); } }
http://stackoverflow.com/questions/4509912/is-it-possible-to-use-bitmapfactory-decodefile-method-to-decode-a-image-from-htt
2015年9月17日 星期四
2015年9月3日 星期四
[Android ] The most popular code are used in android
// general setting final Context context = this; AlertDialog.Builder builder; private ProgressDialog progressDialog; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); builder = new AlertDialog.Builder(context); builder.setMessage("When your IPCam is ready. Press OK to be continued.") .setTitle("") .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { int status= new NetworkAccess().isOnline(cm, builder, -1); if(status==0){ exitAddCamera(); } } }) .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }) .setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { AddCamera.this.finish(); } }); AlertDialog dialog = builder.create(); dialog.show(); progressDialog = ProgressDialog.show(context, "Add camera", "Please wait...."); if(progressDialog!=null){ progressDialog.dismiss(); } }
2015年9月2日 星期三
[Android] disable scrolling motion in the listview
reference: http://codetheory.in/android-listview-scrolling-viewgroup-hide-disable-scrollbars/
XML Layout
1android:scrollbars="none"
android:scrollbars
will define which scrollbars to display or show any at all. This won’t disable scrolling as such (you’ll be able to scroll in the appropriate direction) but just hide the scrollbars from the user interface. More of a UI switch.Programatically, you can callView.setVerticalScrollBarEnabled(boolean)
andView.setHorizontalScrollBarEnabled(boolean)
for similar effect.Return true from ListView onTouch event
123456listView.setOnTouchListener(
new
View.OnTouchListener() {
public
boolean
onTouch(View v, MotionEvent event) {
return
(event.getAction() == MotionEvent.ACTION_MOVE);
}
});
訂閱:
文章 (Atom)