Showing all posts tagged #android:


Android

Posted on June 10th, 2014

[Reference]
  1. How to use registerReceiver method?: http://stackoverflow.com/questions/4134203/how-to-use-registerreceiver-method
  2. Intent: http://stackoverflow.com/questions/4878159/android-whats-the-best-way-to-share-data-between-activities
  3. BroadcastReceiver : http://developer.android.com/reference/android/content/BroadcastReceiver.html
  4. http://stackoverflow.com/questions/3907713/how-to-send-and-receive-broadcast-message
[Broadcast Receiver]
  1. 第二十一講:Broadcast Receiver 使用入門 : http://android.yaohuiji.com/archives/727
  2. 如何使用BroadcastReceiver: http://givemepass.blogspot.tw/2011/12/broadcastreceiver.html
  3. Android Broadcast Receivers: http://www.tutorialspoint.com/android/android_broadcast_receivers.htm
  4. Android BroadcastReceiver within Activity : http://stackoverflow.com/questions/4555215/android-broadcastreceiver-within-activity
  5. How to send and receive broadcast message: http://stackoverflow.com/questions/3907713/how-to-send-and-receive-broadcast-message
[Thread , handler]
  1. ANR(Application is Not Responding) : 如何使用Thread和Handler http://givemepass.blogspot.tw/2011/11/threadhandler.html
[Service]
[Preference]
  1. Preference: http://developer.android.com/reference/android/preference/Preference.html
  2. Class : http://developer.android.com/reference/android/preference/package-summary.html
  3. notify: http://stackoverflow.com/questions/4997907/how-to-detect-if-changes-were-made-in-the-preferences
  4. Click: http://stackoverflow.com/questions/15536908/preference-activity-on-preference-click-listener
  5. Tutorial: http://rominirani.com/android-preferences-tutorial/
  6. list perference: http://stackoverflow.com/questions/9880841/using-list-preference-in-android
  7. ANDROIDMANIFEST.XML 詳解 : http://homeserver.com.tw/2013/09/25/androidmanifest-xml-%E8%A9%B3%E8%A7%A3/
  8. Preference.OnPreferenceClickListener : http://developer.android.com/reference/android/preference/Preference.OnPreferenceClickListener.html
  9. OnPreferenceClickListener : http://www.cnblogs.com/LutherTsai/archive/2011/12/25/2301014.html
  10. OnPreferenceClickListener : http://stackoverflow.com/questions/16449372/onpreferenceclick-and-onpreferenceclicklistener
  11. Tutorial : http://blog.csdn.net/ichliebephone/article/details/5916320
  12. background image: http://mobilemancer.com/2011/05/11/setting-a-background-image-on-a-preferenceactivity/
  13. Click event: http://stackoverflow.com/questions/15536908/preference-activity-on-preference-click-listener
  14. SwitchPreference: http://stackoverflow.com/questions/18414267/switchpreference-and-checkboxpreference-in-code
    http://developer.android.com/reference/android/preference/SwitchPreference.html
  15. implements: http://stackoverflow.com/questions/19776889/android-preferncefragment-implements-onpreferenceclicklistener-never-invoked-on
  16. for loop: http://stackoverflow.com/questions/15536908/preference-activity-on-preference-click-listener


[Activity]
  1. Load string : http://www.connorgarvey.com/blog/?p=9
  2. Get resource : http://stackoverflow.com/questions/7493287/android-how-do-i-get-string-from-resources-using-its-name
  3. System resource : http://stackoverflow.com/questions/2631278/useful-android-system-resources
    Yes (android.R.string.yes), No (android.R.string.no), Cancel (android.R.string.cancel) and Ok (android.R.string.ok).

[Action Bar]
  1. Current time: http://stackoverflow.com/questions/5369682/get-current-time-and-date-on-android
  2. Sleep : http://stackoverflow.com/questions/3342651/how-can-i-delay-a-java-program-for-a-few-seconds
  3. Sleep, wait : http://moodlove.blog.hexun.com.tw/84012935_d.html
  4. Delay - write a callback function for system call: http://tdyapp.blogspot.tw/2013/04/androiddelay.html
    http://cooking-java.blogspot.tw/2010/04/android-timer.html
  5. Thread.sleep, http://developer.android.com/reference/android/os/SystemClock.html
  6. sendMessageDelayed: http://stackoverflow.com/questions/5565826/android-thread-problem
  7. 如何寫一個倒數計時器(CountDownTimer) : http://givemepass.blogspot.tw/2011/12/blog-post_08.html
    http://developer.android.com/reference/android/os/CountDownTimer.html
  8. Format: http://developer.android.com/reference/java/text/SimpleDateFormat.html
  9. java日期格式大全 format SimpleDateFormat: http://eternal1025.iteye.com/blog/344360
  10. Enum DateTimeFormat: https://developers.google.com/apps-script/reference/ui/date-time-format
  11. Standard Date and Time Format Strings: http://msdn.microsoft.com/en-us/library/vstudio/az4se3k1(v=vs.100).aspx
  12. Scripts Language Codes: https://www.softaculous.com/docs/Scripts_Language_Codes

[String]
  1. 如何使用startActivity與startActivityForResult: http://givemepass.blogspot.tw/2011/11/startactivitystartactivityforresult.html
[Camera]
  1. Control the default music player of android or any other music player: http://stackoverflow.com/questions/18800198/control-the-default-music-player-of-android-or-any-other-music-player
[Mulit-language]
[ResolveInfo]
  1. log : adb shell logcat -v time -s ACT STATUS FoxlinkService Check_service_uart > log_FB.txt
[webview]
  1. Password can't do the autofill/autocompelete
    setSavePassword(boolean save)
    This method was deprecated in API level 18. Saving passwords in WebView will not be supported in future versions.
    http://developer.android.com/reference/android/webkit/WebSettings.html
  2. HTML autocomplete Attribute: http://www.w3schools.com/tags/att_input_autocomplete.asp
  3. class : http://developer.android.com/reference/android/webkit/WebView.html
  4. Disabling autosuggestion on WebView?: http://stackoverflow.com/questions/7404798/disabling-autosuggestion-on-webview
[http]
  1. Calling Web Services in Android using HttpClient: http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/
[Menu]

BT

Posted on June 10th, 2014

[Reference]
  1. how to open bluetooth settings in android?: http://stackoverflow.com/questions/13911468/how-to-open-bluetooth-settings-in-android
    Intent intentOpenBluetoothSettings = new Intent();
    intentOpenBluetoothSettings.setAction(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);
    startActivity(intentOpenBluetoothSettings);
  2. REQUEST_ENABLE_BT:
    http://www.cool3c.com/article/27452
    http://www.crifan.com/android_bluetooth_sample_code_can_not_found_request_enable_bt/
  3. BluetoothAdapter : http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_CONNECTION_STATE_CHANGED
  4. android BT: http://developer.android.com/guide/topics/connectivity/bluetooth.html#SettingUp
  5. Connected/Disconnected : http://stackoverflow.com/questions/19584423/how-to-check-if-bluetooth-connection-to-a-device-is-disconnected
[Connect]
[Profile]
  1. AVRCP (Audio/Video Remote Control Profile): http://www.techbang.com/posts/3050--avrcp-bluetooth-cell-phone-headset-is-so-controlled
    覺得用藍牙耳機控制音樂手機的上、下首、播放、停止和音量很有趣嗎?這是因為在藍牙技術協定中包含了AVRCP這個協定。它提供了搖控裝置一個標準的控制介面,讓你可以用一支遙控器或耳機等遙控裝置搖控你所有的電視、電腦或是手機的音訊和視訊介面
  2. webrtc : http://www.webrtc.org/reference/getting-started#TOC-Linux-Android-Specific-Steps




Action Bar

Posted on June 10th, 2014

[Resources]
  1. Styling the Action Bar: https://developer.android.com/training/basics/actionbar/styling.html









    When you crate a new action bar project, add the red portion to your new project.
    (If you get error during compiling.)




Eclipse

Posted on June 6th, 2014

[Android SDK Samples]
  1. Import the project from SDK : https://groups.google.com/forum/#!topic/android-beginners/Y1bTqc61tQU
    Select "Create project form existing source" and then all the fields will
    autopopulate when you select the ApiDemos folder.
  2. Fix build error : http://stackoverflow.com/questions/4298155/compiling-and-running-apidemos
    http://rickiedroid.blogspot.tw/2011/02/add-open-sdk-apidemos-work-with-your.html
    I had the same problem and this is my solution.

    Uncheck "Build automatically" in the menu "project"
    Select "Clean" from menu "project".
    Select "Clean projects selected below" and check "ApiDemos".
    Check "Start a build immediatly", "Build only the selected projects"
[New package]
  1. http://stackoverflow.com/questions/15684183/how-can-i-make-a-child-package-inside-a-package-in-eclipse-project-explorer
    Add new package -> Add new class
  2. use external jar : http://stackoverflow.com/questions/1334802/how-can-i-use-external-jars-in-an-android-project
[Git]
  1. EGit: http://my.oschina.net/China2012/blog/174874
  2. Delete project fail :
    1. Delete the project first, but get failed.(.git/gen folder can't be deleted.)

    2. Close Eclipse , and delete the .git and folder. Do it again.
    1. Clone project from git server

    2. Import | Git | Project from Git or Click the button from the toolbar.
    3. Select the repository from URL
    4. Use ssh to connect to git server
      ssh://username@IP_address/Repository_path
      example : ssh://username@10.8.70.13/data/git/SmartWatch_Android
    5. Enter the password
    6. Set the local directory
    7. Import as an existing projects
    1. Create a new package

    1. Create a new class


  3. The git clone project path is : C:\Users\Administrator\git\SmartWatch_Android , need to select the
  4. Set the user name : Menu | Windows | Preference

    http://wiki.eclipse.org/EGit/User_Guide
    http://stackoverflow.com/questions/10663492/how-to-change-default-author-and-commiter-in-eclipse-git-plugin


[Others]