2015年8月26日 星期三

[Problem] 部分平板裝置在google play上搜尋PX CAM會出現「你的裝置與這個版本不相容」

Problem
部分平板裝置在google play上搜尋PX CAM會出現「你的裝置與這個版本不相容」,而導致不能下載的狀況,如下圖一。


進入google developer console後,選擇以上架的APP,再選擇其「最佳化提示內容」: (請參考圖二)
將出現以下訊息:
設計平板電腦專用版本的應用程式
您的正式發佈 APK 必須符合下列條件:
支援平板電腦所需的目標 Android 版本和最低 Android 版本 (檢查 targetSdkVersion minSdkVersion) 瞭解詳情  =>(點選 瞭解詳情後出項圖三,同以下連結)http://developer.android.com/distribute/essentials/quality/tablets.html#android-versions
(圖二)

(
圖三)


2015年8月24日 星期一

[Problem] Android Studio - Gradle sync project failed


reference:
Android Studio - Gradle sync project failed




he Android plugin 0.8.x doesn't support Gradle 1.11, you need to use 1.10.
You can read the proper error message in the "Gradle Console" tab.
EDIT
You need to change gradle/wrapper/gradle-wrapper.properties file in this way:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip

[XML] Xml & Xslt 特殊字元對應表 (轉貼)


參考來源: http://www.dotblogs.com.tw/alonstar/archive/2008/07/22/4688.aspx

原字元轉換字元
''
""
space  (xslt)
<&lt;
>&gt;
&&amp;
space&nbsp;(html)


[WebView] android get element value from web


http://stackoverflow.com/questions/25074903/android-how-i-can-call-javascript-function-and-getting-the-retur-value-from-ja

http://stackoverflow.com/questions/13527624/how-we-can-execute-a-javascript-function-and-get-a-return-value-in-our-android-a

http://stackoverflow.com/questions/3298597/how-to-get-return-value-from-javascript-in-webview-of-android

http://android-puremvc-ormlite.blogspot.nl/2011/07/using-java-script-in-android-webview.html

http://blog.csdn.net/andersonmao/article/details/7350960

http://stackoverflow.com/questions/5264489/how-do-i-pass-return-values-from-a-javascript-function-to-android

http://stackoverflow.com/questions/13527624/how-we-can-execute-a-javascript-function-and-get-a-return-value-in-our-android-a

http://www.phonesdevelopers.com/1817377/

http://android-puremvc-ormlite.blogspot.nl/2011/07/using-java-script-in-android-webview.html

http://www.28im.com/android/a4031410.html

[Google Drive] DriveId with ResourceId.


cannot get folderId that i just created on google drive


Where did the “createFromResourceId()” go?

2015年8月16日 星期日

[Android] Reference one string from another string in strings.xml? (轉貼)


reference:
http://stackoverflow.com/questions/4746058/reference-one-string-from-another-string-in-strings-xml?rq=1


I think you can't. But you can "format" a string as you like:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="button_text">Add item</string>
    <string name="message_text">You don't have any items yet! Add one by pressing the %1$s button.</string>
</resources>
In the code:
Resources res = getResources();
String text = String.format(res.getString(R.string.message_text),
                            res.getString(R.string.button_text));

2015年8月13日 星期四

[Problem] How can I write character & in android strings.xml (轉貼)

String Resources
http://developer.android.com/intl/zh-tw/guide/topics/resources/string-resource.html#FormattingAndStyling

Formatting strings

If you need to format your strings using String.format(String, Object...), then you can do so by putting your format arguments in the string resource. For example, with the following resource:
<string name="welcome_messages">Hello, %1$s! You have %2$d new messages.</string>
In this example, the format string has two arguments: %1$s is a string and %2$d is a decimal number. You can format the string with arguments from your application like this:
Resources res = getResources();
String text = String.format(res.getString(R.string.welcome_messages), username, mailCount);


ASCII Converter
http://www.mikezilla.com/exp0012.html

How can I write character & in android strings.xml
http://stackoverflow.com/questions/3053062/how-can-i-write-character-in-android-strings-xml

Easiest way is to quote or backslash them:
http://stackoverflow.com/questions/10575898/special-chars-as-xml-string-in-android-app

[Android] How To fix white screen on app Start up? (轉貼)


reference:
How To fix white screen on app Start up?
http://stackoverflow.com/questions/20546703/how-to-fix-white-screen-on-app-start-up


<activity
        android:name="first Activity Name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" >
 <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
 </activity>

[Google Drive] Google Drive Android API Trash Sample and Delete Sample..


Google Drive Android API Trash Sample
https://github.com/googledrive/android-trash


Google Drive Android API Delete Sample.