久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='B08BI'></bdo><ul id='B08BI'></ul>

    <small id='B08BI'></small><noframes id='B08BI'>

  1. <i id='B08BI'><tr id='B08BI'><dt id='B08BI'><q id='B08BI'><span id='B08BI'><b id='B08BI'><form id='B08BI'><ins id='B08BI'></ins><ul id='B08BI'></ul><sub id='B08BI'></sub></form><legend id='B08BI'></legend><bdo id='B08BI'><pre id='B08BI'><center id='B08BI'></center></pre></bdo></b><th id='B08BI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='B08BI'><tfoot id='B08BI'></tfoot><dl id='B08BI'><fieldset id='B08BI'></fieldset></dl></div>
    <tfoot id='B08BI'></tfoot>

      <legend id='B08BI'><style id='B08BI'><dir id='B08BI'><q id='B08BI'></q></dir></style></legend>

      無法在 Android 中使用 ExifInterface 設置 Date Taken/D

      Cant set Date Taken/DateTime tag using the ExifInterface in Android(無法在 Android 中使用 ExifInterface 設置 Date Taken/DateTime 標簽)
            <bdo id='Erszl'></bdo><ul id='Erszl'></ul>

                <tbody id='Erszl'></tbody>
              • <tfoot id='Erszl'></tfoot><legend id='Erszl'><style id='Erszl'><dir id='Erszl'><q id='Erszl'></q></dir></style></legend>
                <i id='Erszl'><tr id='Erszl'><dt id='Erszl'><q id='Erszl'><span id='Erszl'><b id='Erszl'><form id='Erszl'><ins id='Erszl'></ins><ul id='Erszl'></ul><sub id='Erszl'></sub></form><legend id='Erszl'></legend><bdo id='Erszl'><pre id='Erszl'><center id='Erszl'></center></pre></bdo></b><th id='Erszl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Erszl'><tfoot id='Erszl'></tfoot><dl id='Erszl'><fieldset id='Erszl'></fieldset></dl></div>

                <small id='Erszl'></small><noframes id='Erszl'>

                本文介紹了無法在 Android 中使用 ExifInterface 設置 Date Taken/DateTime 標簽的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我已經研究并嘗試了許多選項來嘗試讓它工作,但不幸的是我沒有得到任何結果.

                I've researched and tried numerous options to try and get this to work, but am not getting anywhere with this unfortunately.

                我要做的是在 Android 應用程序中的 JPEG 的 Exif 數據中設置拍攝日期標簽 (Tag_DateTime).我已經有工作代碼來設置緯度和經度標簽,但我一生都無法設置拍攝日期標簽.

                What I am trying to do is set the Date Taken tag (Tag_DateTime) in a JPEG's Exif data from within an Android app. I already have working code to set the Latitude and Longitute tags, but cannot for the life of me get the Date taken tag to set.

                代碼如下:

                SimpleDateFormat fmt_Exif = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");
                try {
                    ExifInterface exif = new ExifInterface(filePhoto.getPath());
                
                    // Set and save the GPS and time data
                    exif.setAttribute(ExifInterface.TAG_GPS_LATITUDE, strLat);
                    exif.setAttribute(ExifInterface.TAG_GPS_LONGITUDE, strLong);
                    exif.setAttribute(ExifInterface.TAG_DATETIME, fmt_Exif.format(locLatestLocation.getTime()));
                    exif.saveAttributes();
                
                } catch (IOException e) {
                    e.printStackTrace();
                }
                

                • locLatestLocation - 用于獲取時間的位置(以毫秒為單位).
                • fmt_Exif - SimpleDateFormat 用于將毫秒時間格式化為 TAG_DateTime Exif 標記的正確格式.
                • strLat &strLong - 以正確的格式填充到其他位置以設置緯度和經度標簽.
                • 我在某處的帖子中讀到該標簽需要以毫秒格式編寫,因此也嘗試過,但無濟于事.為了用實際存儲的內容確認我的格式,我從具有 Date Taken 標簽的 jpeg 文件中讀取并輸出了未格式化的標簽,但輸出的格式與我寫入標簽的格式完全相同,而且它仍然不工作.

                  I read in a post somewhere that the tag needs to be written in the milliseconds format, so have tried this too to no avail. In order to confirm my formatting with what is actually stored, I read and outputted the unformatted tag from a jpeg file which has the Date Taken tag, but the output is in exactly the same format as what I am writing to the tag and its still not working.

                  可能還值得一提的是,我已經研究了 Sanselan 類來執行此操作,并且由于復雜性和缺乏示例,我寧愿嘗試讓我現有的解決方案工作,然后再更改為完全不同的解決方案.

                  It might also be worth mentioning that I have looking into the Sanselan class to do this, and due to the complexity and lack of examples would much rather try and get my existing solution working before changing to a completely different one.

                  有沒有人設法做到這一點,如果有,我做錯了什么??

                  Has anyone managed to do this and if so what am I doing wrong??

                  推薦答案

                  Android 的 ExifInterface 很煩人,會默默地丟棄它認為無效的任何數據.更糟糕的是,文檔甚至沒有提到有效值可能是什么.

                  Android's ExifInterface, annoyingly, silently discards any data it deems to be invalid. Worse yet, the documentation doesn't even mention what valid values might be.

                  我還發現,如果你指定了一個Android無法識別的EXIF屬性(IE:它不是ExifInterface的TAG_常量之一),它也會完全忽略它,也會默默失敗.

                  I've also found that if you specify an EXIF attribute that Android can't figure out (IE: it's not one of ExifInterface's TAG_ constants), it will also completely ignore it, and also fail silently.

                  這篇關于無法在 Android 中使用 ExifInterface 設置 Date Taken/DateTime 標簽的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                Get current location during app launch(在應用啟動期間獲取當前位置)
                locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
                1. <i id='2PMeu'><tr id='2PMeu'><dt id='2PMeu'><q id='2PMeu'><span id='2PMeu'><b id='2PMeu'><form id='2PMeu'><ins id='2PMeu'></ins><ul id='2PMeu'></ul><sub id='2PMeu'></sub></form><legend id='2PMeu'></legend><bdo id='2PMeu'><pre id='2PMeu'><center id='2PMeu'></center></pre></bdo></b><th id='2PMeu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2PMeu'><tfoot id='2PMeu'></tfoot><dl id='2PMeu'><fieldset id='2PMeu'></fieldset></dl></div>

                      <tbody id='2PMeu'></tbody>

                      <small id='2PMeu'></small><noframes id='2PMeu'>

                          <bdo id='2PMeu'></bdo><ul id='2PMeu'></ul>
                          <legend id='2PMeu'><style id='2PMeu'><dir id='2PMeu'><q id='2PMeu'></q></dir></style></legend><tfoot id='2PMeu'></tfoot>
                          主站蜘蛛池模板: 日韩中文字幕在线播放 | 久久久中文 | 五月婷婷在线播放 | 成人做爰9片免费看网站 | 亚洲精品在线免费观看视频 | 日韩精品一区二区三区中文字幕 | 亚洲视频在线观看 | 久久久久se | 久久精品国产99国产精品 | 日韩欧美天堂 | 天堂va在线 | 成人综合视频在线观看 | 国产精品96久久久久久 | 精品欧美一区二区中文字幕视频 | 亚洲一区毛片 | 91大神在线看 | 免费精品视频在线观看 | 国产精品久久国产精品久久 | 国产精品国产精品国产专区不卡 | 91在线视频免费观看 | 中文字幕一区二区不卡 | av资源网站| 亚洲一区二区精品视频在线观看 | 狠狠狠色丁香婷婷综合久久五月 | 日本亚洲一区 | 99精品在线观看 | 日韩一级免费大片 | 狠狠狠色丁香婷婷综合久久五月 | h在线免费观看 | 国产三区四区 | 在线观看视频福利 | 欧美日韩精品久久久免费观看 | 国产精品久久久久久久久久久免费看 | 亚洲精品黄色 | 国产日韩欧美激情 | 亚洲欧美日韩精品 | 亚洲一区二区久久 | 色就是色欧美 | 欧美精品久久久久 | 一本一道久久a久久精品综合蜜臀 | 日韩欧美一区二区在线播放 |