zhongkai886
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 補充能力 ## 環境問題 https://blog.csdn.net/flyfight88/article/details/83088137 ## 後端部分 https://hackmd.io/zGPmZ-VqT1C1WA5Gkw_S6g Port號8080 占用問題 解決方案 https://www.itread01.com/content/1542222326.html ## java reflection -自定義 itemDialog https://stackoverflow.com/questions/7811117/custom-objects-in-alertdialog-list-how-to-get-a-display-string-and-then-the-act AlertController Source code https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/com/android/internal/app/AlertController.java ``` AlertDialog dialog=new AlertDialog.Builder(this) .setTitle(message) .setPositiveButton(android.R.string.yes, null) .setIcon(android.R.drawable.ic_dialog_alert) .show(); try { Field mAlert = AlertDialog.class.getDeclaredField("mAlert"); mAlert.setAccessible(true); Object mAlertController = mAlert.get(dialog); Field mMessage = mAlertController.getClass().getDeclaredField("mTitleView"); mMessage.setAccessible(true); TextView mMessageView = (TextView) mMessage.get(mAlertController); mMessageView.setTextSize(40); dialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextSize(30); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (NoSuchFieldException e) { e.printStackTrace(); } ``` https://blog.csdn.net/qq_16628781/article/details/60768725 ## WebView https://blog.csdn.net/lowprofile_coding/article/details/77928614 裡面有一段code因為是從大陸出來的,所以他們需要翻牆, 而我們不用翻牆,所以刪掉那段code可以執行得更快 ## 關於自定義Application 1.如果apk method 數量超過 65k 在 build.gradle (module)加上 // minSdkvesion<21 multiDexEnabled true implementation 'com.android.support:multidex:1.0.3' 在自定義Application Class加上 ``` @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); //app大小超過65k用自定義的東西就要用 MultiDex.install(base); } ``` 2.Manifest.xml android:name="Application路徑" ## 關於Debug Dagger * 重點是要看所有地方,不要看他錯的,要看他錯的附近 * ex 報錯是java.lang.IllegalArgumentException: Illegal URL [duplicate] * 但是其實是okhttp increpter設置錯誤 ## OKhttp Increpter addIncrepter() 是在執行之前就會加 addNetworkInterceptor() 是在執行之中的時候加入 所以你加入header應該用networkincreptor connectTimeout應該在increptor 參考code (有dagger) ``` @Singleton @Provides @Named("APIClient") OkHttpClient provideAPIClient(HttpLoggingInterceptor httpLoggingInterceptor, @Named("APIHeader") Interceptor interceptor){ return new OkHttpClient().newBuilder() .addInterceptor(httpLoggingInterceptor) .addNetworkInterceptor(interceptor) .connectTimeout(10, TimeUnit.SECONDS) .readTimeout(10,TimeUnit.SECONDS) .writeTimeout(10,TimeUnit.SECONDS) .build(); } ``` url:https://www.jianshu.com/p/fc4d4348dc58 url:https://stackoverflow.com/questions/32196424/how-to-add-headers-to-okhttp-request-interceptor ## DataBinding 1.當TextView Color需根據情況改變 or Image Res改變 設定屬性 -> databinding ---> @BindingAdapter("屬姓名") public static void funName(ViewType type,arg...){ ...... } 參考url:https://blog.csdn.net/lixpjita39/article/details/79054052 ## 無線燒錄(手機熱點預設IP:192.168.43.1) https://thumbb13555.pixnet.net/blog/post/317452890-android-studio-%E4%B9%8B%E7%84%A1%E7%B7%9A%E8%AA%BF%E8%A9%A6%E7%9A%84%E6%96%B9%E6%B3%95 ## QR code 掃描器 https://www.ruyut.com/2018/12/5-android-studio-qr-code.html 相機自動對焦 cameraSource = new CameraSource.Builder(this.getActivity(),barcodeDetector).setAutoFocusEnabled(true).build(); ## reCAPTCHA 我不是機器人 reCAPTCHA 類型:v2 Android https://kantai235.github.io/AndroidSafetyNetReCAPTCHAAPI/ ## ViewPage TabLayout或BottomNavigationView配合使用 https://blog.csdn.net/shanshui911587154/article/details/74989779 ## 讀寫CSV檔案 https://www.itread01.com/article/1503971159.html ## SQLite 儲存本地CSV 1. 新增資源庫 ###### 注意事項: `版本問題`Android 10需要使用getExternalFilesDir(type) ###### 如果有時候發病錯誤 可以在manifest application加上 ###### android:requestLegacyExternalStorage="true" **type**為路徑新增資料夾名稱 ###### 參考資料 : `library`https://stackoverflow.com/questions/39253151/jxl-jar-in-android ###### 參考資料:`讀取資料庫行列寫成csv檔案` https://parallelcodes.com/android-export-sqlite-database/ ## 本地雲端上傳 GoogleDrive Upload 注意問題 sha-1 有分成release 和 debug版本 如果有版本需求要記得使用正確 ###### 參考資料 : `url` # 常見問題 Layout相關 Drawable資料夾的resource名稱(圖片名稱) 只允許a-z和1-9 英文在前 example 'a1' ## Error Code java.net.UnknownServiceException: CLEARTEXT communication to 60.249.57.53 not permitted by network security policy 原因 : android 9 以上需要用https 解決:在res/xml資料夾多創一個layout文件 network_security_config.xml ``` `<?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config cleartextTrafficPermitted="true"> <domain includeSubdomains="true">domain-name.com</domain> </domain-config> </network-security-config>` ``` manifest 加上 `android:networkSecurityConfig="@xml/network_security_config "` url:https://stackoverflow.com/questions/60175852/cleartext-communication-not-permitted-by-network-security-policy-working-on-my-m # 環境問題 Gradle(app) ###### 輸出檔案 apk name : outputFileName 不要有"中文" 專案路徑不要有中文 ###### This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer 在gradle `classpath 'com.android.tools.build:gradle:自己androidStudio版本'` 參考url:https://stackoverflow.com/questions/53331462/this-version-of-android-studio-cannot-open-this-project-please-retry-with-andro # 現有專案注意事項 ## 交大 ## 明昌_報工 ###### 測試帳號 M2491 八樓Machan2.4,5G WIFI密碼 machanuser IP 10.1.5.34 ### 流程 #### 上班 > 註冊(開始<綠色> 藍色 結束<紅色>) #### 完成註冊後產生 TagId Tag類別 列印狀態 #### 列印完成返回 (沒用的紙) #### 錄入 tag註冊到系統中 錄入製令 今天報工找到訂單製令 錄進去系統的tag 被系統做mapping動作 三種tag錄入完 進行報工 >註冊 分顏色註冊 綠 藍 紅(順序沒差 一定要分批) > >錄入(輸入製令單號 [ 資料庫看 ] 和數量 [ 藍色多少 ]) >全部放 (1綠1紅8藍) 就輸入8藍 >///第一台/// A開始區 綠=> X藍 => 紅 (dashbot會跳) >WEBTeam board開啟 看到之後投入數會增加 投入數=藍色數 >///第三台/// A完工區 APP打開 刷完工區綠藍藍藍紅 >//慢一點等APP列印完等三十秒 >投入數一個放進去一個 解法 目前試web team刪除資料表 邵翔現身說法 >mes_registers(2020/11/18) >mes_qc_passes(2020/11/18) >mes_qc_passes_mos(2020/11/18) >mes_mo_rfids(2020/11/18) >mes_records(2020/11/18) >mes_rfids(2020/11/18) >notifications(2020/11/18) ## 台達 內網 2706 Imac-5g

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully