couchbase todolist get database sync part

https://github.com/couchbaselabs/ToDoLite-Android Write ToDoLite database sync guy is very good. OK, take out. android studio:new project then Copy todolist four java : Application.java、BaseActivity.java、Preferences.java、Synchronize.java Edit java : MainActivityjava、AndroidManifes.xml 1、app/src/main/AndroidManifest.xml <application add android:name=“com.sandk.groupaccountbook.Application” 2、app/src/main/java/com/sandk/groupaccountbook/MainActivity.java change public class MainActivity extends ActionBarActivity => public class MainActivity extends BaseActivity { If have new activity, just change extends to BaseActivity, then can use application.getDatabase(). four java : any use facebook just // or delete now database = application.getDatabase() is ok~~ ...

2015-06-16 · 1 min · 116 words · Me

android & couchbase app -- ok, now can share little

1. activity_main.xml => tools:context=".MainActivity" => MainActivity.java …….I try first… is more better then post. ========= ========= ===== suggestion newbie ===== https://github.com/couchbaselabs/CouchbaseLite-DevDay-StarterKit https://github.com/couchbaselabs/GrocerySync-Android https://github.com/couchbaselabs/ToDoLite-Android (Hard Understand) SO see this first: http://sueboy.blogspot.com/2015/06/couchbase-todolist-get-database-sync.html ========= MainActivity.java BuildConfig – 來自 build.gradle ( Module.app ) 目錄app – build.gradle extends ActionBarActivity – http://blog.tonycube.com/2014/02/android-actionbarcompat-1.html Intent – http://www.imyukin.com/?p=183 – http://kezeodsnx.pixnet.net/blog/post/27072894-android-----%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F%E8%87%AA%E6%88%91%E4%BB%8B%E7%B4%B9%E4%B9%8Bintent-resolution startService – http://blog.maxkit.com.tw/2014/01/android-serviceintentservice.html – http://blog.kenyang.net/2012/11/android-startservice-vs-bindservice.html – http://blog.csdn.net/biezhihua/article/details/44439897 context.bindService() <==> context.startService() context.startService() ==> Service <==> IntentService AsyncTask – http://a-can.logdown.com/blog/201623/android-asynctask-asynchronous-functions-are-carefully Observer – http://www.apkbus.com/android-112815-1-1.html runOnUiThread – http://lak4cyut.blogspot.com/2011/03/android-tip-activityrunonuithread.html – http://blog.csdn.net/zhang_yanye/article/details/40794629 getApplication Application.java – http://www.cnblogs.com/duanxz/p/4379800.html Replication 同步local到remote – http://developer.couchbase.com/mobile/develop/references/couchbase-lite/couchbase-lite/replication/index.html ...

2015-06-16 · 2 min · 292 words · Me

couchbase basic auth basicAuth startReplicationSyncWithBasicAuth --- How To Do

突然想到,他的basic auth,其實不是用來給系統用的,是給app用的 也就是app每一支都是用同樣的basicAuth id/pwd登入,區分 管理者和一般使用者 而一般使用者註冊後,帳密是另外開一個doucment,之後所有的文件管理是自己要控制的 跟mysql的一樣,不會給每個人有basic auth,權限管理,也是在sql下的時候,抓出資料做判斷 所以才會在 add user時,用restful curd,使用者代表不同的專案 ========== This is my think: couchbase basic auth is not for every body login. It is app connect to sync_gateway for auth. Example is have normal user and Admin user. Maybe login sync_gateway, that get different document、channel、sync. Normal user registered. The register data put in document, Maybe document name is “members” then system programmer need to control document show or not by permit. Like sql not everybody register, then get login mysql account. Only one account connect. After login, everythings is by program control. ...

2015-06-16 · 2 min · 331 words · Me

graphical http client restful

https://code.google.com/p/im-only-resting/ http://www.swensensoftware.com/im-only-resting https://github.com/wiztools/rest-client

2015-06-15 · 1 min · 3 words · Me

RecyclerView onclick

RecyclerView step 3 step1 public class xxxxxxxx extends RecyclerView.Adapter<MyAdapter.ViewHolder> implements View.OnClickListener { step2 public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position viewHolder.textView.setOnClickListener(this); textView is findViewById(R.id.xxxxxxxxx) step3 @Override public void onClick(View view) { int viewId = view.getId(); if (viewId == R.id.xxxxxxxxx) { //which item click if (onItemClickListener != null) { onItemClickListener.onItemClick(view, (Integer) view.getTag()); } } } view.getTag() maybe null

2015-06-14 · 1 min · 56 words · Me

about RecyclerView error: android.widget.LinearLayout cannot be cast to android.widget.TextView

https://developer.android.com/training/material/lists-cards.html I think many people, try to do this demo. But this demo is not good, because some things no show. like: RecyclerView .xml to a layout:…….only little, but ok, this not import. MyAdapter .xml no layout: this is bad. Get error in here. so, follow this do is better http://stackoverflow.com/questions/28407768/android-widget-linearlayout-cannot-be-cast-to-android-widget-textview-in-recycle Gorcyn is good guy~~ ^ ^ But what different with android demo (fxxxxxxxxxxxxxx) android: public ViewHolder(TextView v) { mTextView = v; good guy: ...

2015-06-14 · 1 min · 148 words · Me

[轉]Google 出手尝试解决 Android WebView 的碎片化

https://typeblog.net/tech/2015/04/06/google-released-seperate-webview.html Google Play Store 上发现了一个新的App: Android System WebView 用來更新 WebView 但只限官方的rom,因為 指向到 com.android.webview 和 com.google.android.webview 後者才有用 所以作者用 Xposed 處理

2015-06-09 · 1 min · 19 words · Me

[轉]Android app has error: Execution failed task':app:preDexDebug' trying to test parse but can't run app with this error

https://teamtreehouse.com/forum/android-app-has-error-execution-failed-taskapppredexdebug-trying-to-test-parse-but-cant-run-app-with-this-error http://stackoverflow.com/questions/25529155/android-studio-gradle-error-predexdebug Try this : File —-> Invalidate caches/restart

2015-06-07 · 1 min · 9 words · Me

promote free and open source software on the Android platform

https://fossdroid.com/

2015-05-11 · 1 min · word · Me

crosswalk js html5 android native

COCOS2D http://www.cocos2d-x.org/MoonWarriors/index.html http://www.cocos2d-x.org/js-tests/ appgyver

2015-05-07 · 1 min · 4 words · Me

深入淺出 Android -- Google 手持設備應用程式設計入門

https://code.google.com/p/androidbmi/wiki/DiveIntoAndroid

2014-10-19 · 1 min · word · Me

pc control android

webkey http://webkey.cc/ How to Control an Android Device From Your PC http://blog.laptopmag.com/control-android-from-pc How to control your Android via PC http://www.cnet.com/how-to/how-to-control-your-android-via-pc/ aten tap CS533http://www.aten.com/Mobility-&-USB/Tap–USB-to-Bluetooth-KM-Switch/Tap-(USB-to-Bluetooth-KM-Switch)-Tap-your-desktop-keyboard-into-an-iPhone%C2%AE-or-iPad%C2%AE!~CS533.html

2014-10-08 · 1 min · 23 words · Me

android crosswalk intel XDK codova

剛用intel XDK 做crosswalk,用codova,做純網頁 app,非常慢…..慢到極點了 crosswalk是把最新的chorme的核心,包在apk中,只有4.4才是內建chorme新的核心,所以crosswalk就是把apk包了chorme,讓apk走html5架構暴快 如果單純crosswalk比cocoonjs還快,目前看有人測試,所以是慢在codova….. codova太慢了,如果用android studio 做原生的webview,連網頁超快,但我現在手機,雖然是4.2,但底層已換chorme,所以我測很快,所以現在兩種情況: 一、以後走4.4後,chorme為底層broswer時,html5暴快, 二、等android studio可以包crosswalk時,就算4.x的都暴快,4.0以下不能用crosswalk,但包了crosswalk會胖20 MB 但,很妙的是,如果走codova crosswalk XDK,放到手機中,吃的記憶體不多,5x~8x MB,但會自動掛掉 …….

2014-09-28 · 1 min · 18 words · Me

android webview performance crosswalk

Now HAHA!! https://diego.org/2015/01/07/embedding-crosswalk-in-android-studio/ https://crosswalk-project.org/documentation/embedding_crosswalk/crosswalk_aar.html https://www.timroes.de/2013/11/23/old-webview-vs-chromium-webview/ Have you looked at crosswalk? https://crosswalk-project.org/ It’s a chromium web runtime that can be packaged with the app, so you get a benefit on 4.x devices, not just kitkat. It has more features (like webrtc) and sometimes outperforms chromium webview. https://crosswalk-project.org/ ============== https://gist.github.com/butelo/9365587 1:R.layout.activity_xwalk_embed_lib -> R.layout.xxxxx 2: R.menu.xwalk_embed_lib -> R.menu.xxxx 3: AndroidManifest.xml ============== use this https://groups.google.com/forum/#!msg/adt-dev/nQobKd2Gl_8/Z5yWAvCh4h4J problem:libxwalkcore.so can be soft. just do armeabi-v7a.jar is have lib/armeabi-v7a/libxwalkcore.so and jar put in libs test for this, use android studio, have big problem:libxwalkcore.so ...

2014-09-28 · 1 min · 170 words · Me

android 自動版本更新

http://blog.csdn.net/xjanker2/article/details/6303937 有非常重要的重點: *****請先下載Config.java和NetworkTool.java兩個程式,放到對應的java目錄下。 https://code.google.com/p/androidex/source/browse/trunk/jtapp-12-updateapksamples/#jtapp-12-updateapksamples%2Fsrc%2Fjtapp%2Fupdateapksamples *****UpdateActivity.java 是主程式,把對應的程式碼改到你的程式,其中要注意的是,程式碼中的UpdateActivity請記得要換成你自己的名稱….我也是被搞了一下~~哈 *****為什麼在模擬器中,更新會不能安裝,找到的文章解釋 http://stackoverflow.com/questions/19959890/android-app-not-install-an-existing-package-by-the-same-name-with-a-conflicting the APK installed in the Emulator is signed with your debug-key(usually installed in ~/.android/debug.keystore) 因為key不同,但實際上,如果建置完畢的話,更新是不會有這問題。目前確實成功。 發生錯誤: NetworkTool.java 中 HttpResponse response = client.execute(new HttpGet(url)); 會發生 ERROR : android.os.NetworkOnMainThreadException 解決方式: 方法一:/設定可以讓Thread運行在Android主要Thread/ http://stackoverflow.com/questions/16439587/android-os-networkonmainthreadexception-with-android-4-2 在 HttpResponse response = client.execute(new HttpGet(url)); 之前放上 if (android.os.Build.VERSION.SDK_INT > 9) { StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); } 並 import android.os.StrictMode; 方法二: etwork problem的問題我試了,是HTTPClient的部份不能在UI Thread做,寫一個extend AsyncTask的class讓HTTPClient的部份在background做就可以了 http://givemepass.blogspot.com/2011/12/http-server.html =========================== 第二個問題:寫檔在sd上 在AVD建的時候要加上SD卡的容量 在 AndroidManifest.xml 補上 於 9月 26, 2014

2014-09-26 · 1 min · 76 words · Me

android studio

http://save-coco.blogspot.com/2014/07/maven-eclipseandroid-app.html Maven 據說很難用…功能強大,很難用 http://blog.csdn.net/wangwei_cq/article/details/17070307 Gradle 現在用這個 http://www.codedata.com.tw/java/understanding-gradle-3-getting-started/ http://ithelp.ithome.com.tw/question/10129873 http://jdev.tw/blog/3513/learning-android-studio ===================== setup 1: onclick http://www.youtube.com/watch?v=RCyuqMVGl4g TextView mytv = (TextView)findViewById(R.id.textView); mytv.setText(“change textView!”); ===================== setup 2: export a

2014-09-25 · 1 min · 25 words · Me

[轉]Launcher

http://www.modaco.com/topic/372741-rom411b209-aosp-mod-22072014/page-42#entry2219923 I want to give he “good” Today I have test some launcher in terms of Ram usage & features: APUS : is the lighter, but it miss every features, no app drawer, no desktop image personalization, some crash, is a new app so is normal… I think is a good idea and in future can be a good alternative, but not at the moment. SOLO Launcher: for me is the winner, 32mb usage, complete, app drower included, digital clock & weather included, every setting you are using in nova is present, no ads, free and well developed. Nice features: gestures are included and for free, search included (internet, contact, apps) and available in lockscreen, Clock&Weather included, a Ram cleaner widger included MI Launcher aka Miui: a nightmare, heavyyyyy more than 80 mb, crash, too much complicated and rich of crapware Holo launcher: not bad but it use 40-45 mb of ram, complete as Nova and lighter but not enough compared to Solo KK Launcher: same as Holo just a litle light 36-40 mb, not bad at all and include all Nova features and more, even Clock&Weather is included, good persolazisations, theme, icons…. For me is in second place after Solo ADW: too old and a little complicated add icons at he home, 40mega usage. Is a pain s not developed anymore. APEX: is the same as nova even in ram usage too heavy for our device. NOVA: is the default launcher but easy it pass more than 60 mb with 2 process active the most of the time. Now I delete Nova and my clock and weather app (Sensee Flick Clock & weather) that use in complex 70 mb and I use SOLO that use only 32mb of ram ...

2014-07-20 · 2 min · 290 words · Me

android

http://www.mobile01.com/topicdetail.php?f=423&t=1176275#13863818

2009-11-11 · 1 min · word · Me