發表文章

EZ Crypto Privacy Policy

Privacy Policy DroidParadise built the EZ Crypto app as an Ad Supported app. This SERVICE is provided by DroidParadise at no cost and is intended for use as is. This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at EZ Crypto unless otherwise defined in this Privacy Policy. Information Collection and Use For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I reque…

於 Kotlin 使用 Glide v4 Generated API

Glide 從 v3 升級到 v4 之後,某些設置例如 skipMemoryCache()、placeholder() 等...,必須先另外建立 RequestOptions 再 apply(),用法不像原本那麼流暢。
val options = RequestOptions() .skipMemoryCache(true) .placeholder(R.drawable.place_holder) Glide.with(this) .load(url) .apply(options) .into(ui_sparkline_7d)
不過官方也提供了一個 Generated API 的方式,讓我們可以用跟以前一樣的方式呼叫這些 API。
以下以 Kotlin 為示範:

首先添加 Glide 的依賴庫及 Annotation Processor。
dependencies { implementation 'com.github.bumptech.glide:glide:4.7.1' kapt 'com.github.bumptech.glide:compiler:4.7.1' }
為了讓 Kotlin 支援 Annotation Processor,還需於 build.gradle 加上這行。
apply plugin: 'kotlin-kapt'
接著實作一個 AppGlideModule。
import com.bumptech.glide.annotation.GlideModule import com.bumptech.glide.module.AppGlideModule @GlideModule class MyAppGlideModule : AppGlideModule()
最後把原本的 Glide.with() 改成 GlideApp.with(),就能跟之前一樣囉!
GlideApp.with(this) .load(url) .skipMemoryCache(true) .placeholder(R.drawable.place_hol…

BatteryLevel Widget Privacy Policy

Privacy Policy DroidParadise built the BatteryLevel Widget app as a Free app. This SERVICE is provided by DroidParadise at no cost and is intended for use as is. This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at BatteryLevel Widget unless otherwise defined in this Privacy Policy. Information Collection and Use For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information t…

升級 macOS 後 Android Studio 出現 Can't start Git: /usr/bin/git 的問題

今天把 macOS 升級到 High Sierra 了,
結果一打開 Android Studio 就出現以下的錯誤:

Can't start Git: /usr/bin/git
Probably the path to Git executable is not valid. Fix it.

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

解決方式很簡單,請在終端機執行 xcode-select --install 安裝新版的 Command Line Tools 就可以囉 :)

EZ Cafe Privacy Policy

Privacy Policy DroidParadise built the EZ Cafe app as a Free app. This SERVICE is provided by DroidParadise at no cost and is intended for use as is. This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at EZ Cafe unless otherwise defined in this Privacy Policy. Information Collection and Use For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request is retaine…

透過程式碼輸出 SharedPreferences 與 SQLite

註:新版 Android Studio 的 Device File Explorer 已經可以直接開啟 InternalStorage 裡的檔案了,非常方便 ,不用再自行輸出了。

應用程式中常會使用 SharedPreferences 及 SQLite 來儲存資料,但想檢視裡頭資料時該怎麼做呢?

首先,SharedPreferences 以及 SQLite 都是以檔案方式儲存於 InternalStorage,路徑分別如下:

SharedPreferences:
使用 getDefaultSharedPreferences 的位置
/data/data/your.package.name/shared_prefs/your.package.name_preferences.xml
使用 getSharedPreferences 的位置
/data/data/your.package.name/shared_prefs/your_prefs_name.xml

SQLite
/data/data/your.package.name/databases/your_db_name

但基本上 InternalStorage 是受保護的,想直接觀察會有點麻煩。
因此這邊提供了一個工具類(Java版Kotlin版),可以幫您把 SharedPreferences、SQLite、Realm、Logcat 輸出到外部儲存空間方便您檢視。
輸出位置
ExternalStorage/Android/data/your.package.name/files/

此外,別忘了添加權限。
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

App 在 Google Play 被停權與恢復的經驗分享

圖片
最近心情真像是洗了三溫暖~
前幾天把已經很久沒維護的 EZ App安裝器 稍微調整了 UI,修了修 Bug,提交更新。
幾個小時過去發現 Google Play 還沒反應,感覺有點怪...可能是系統忙碌吧。當下也沒想太多就跑去睡了。
隔天一早打開開發者控制台,登愣!又看到熟悉的景象... App 被停權了!!!


為什麼說"又"呢?
出來混總是要還的,被停權也不是第一次了。
多年前剛開始在 Google Play 上架時,學別人在商店描述裡加了一堆 Keyword,其實有沒有用也不知道。然後某次開發人員計劃政策調整後,這種行為被視為違規,於是一下子被停權兩隻 App。
畢竟是自己沒注意到政策調整,而且罪證確鑿,只好摸摸鼻子認了。不過明明是很簡單就能修正的問題,Google 總是完全不給機會就直接停權,手段實在狠毒!這也是最讓人難以接受的地方。

順帶一題,Google Play 的違規處分大概分為以下幾種:
拒絕:更新版本遭拒,但之前所發佈的版本仍會保留在 Google Play 商店中。下架:應用程式會從 Google Play 下架。必須提交符合規範的更新版本,才能讓應用程式重新上架。停權:應用程式會從 Google Play 下架。必須更改 package name,才能讓應用程式重新上架。這意味著將失去原本累積的下載數、統計資料和評分,一切重頭來過。終止開發者帳號:所有應用皆會下架,無法再上架新應用。"相關帳戶"也會一併處分,不允許再註冊新的開發者帳號。 我三次遇到的都是停權,但這次的原因是為什麼呢?
根據信裡的說明是違反了開發人員發佈協議的"其他商店"條款。
什麼是"其他商店"條款?

4.5 其他商店。凡是「產品」具有任何推廣其他商店之用途,藉此引導使用者透過這類替代性管道發佈 Android 軟體應用程式或遊戲,則一概禁止在「商店」中發佈或提供。

奇怪?我的 App 裡面沒有推廣其他應用程式商店啊?
信中有申訴的管道,寫信去問明白吧。網頁說可以用中文、英文、日文及韓文提出申訴,就直接寫中文吧。一來比較好溝通,同時看看都是講中文的會不會比較寬大為懷 XDD~

提出申訴後過了幾個小時,收到回覆了。
原來是我的 App 有"分享 APK 檔案給朋友"的功能。因此被視…