¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ñ¸ì¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS

Titanium Mobile/Android

Last-modified: 2018-11-14 (¿å) 15:24:02 (2153d)
Top / Titanium Mobile / Android

Android¿½ÀÁ»þ¥á¥â

  • Titanium Studio¾å¤«¤é¤â[Distribute - Android App Store] - [Keystore Location¤Çnew]¤Ë¤è¤Ã¤Æ¥­¡¼¥¹¥È¥¢¥Õ¥¡¥¤¥ë¤¬ºî¤ì¤ë¤¬¡¢¤³¤ì¤ÇPublish¤¹¤ë¤È¥Ó¥ë¥ÉÅÓÃæ¤ÇÆüÉÕ¥¨¥é¡¼¤È¤Ê¤ë(java.io.IOException: Parse Generalized time, invalid format)¡£¥³¥Þ¥ó¥É¥é¥¤¥ó¾å¤ÇÀ¸À®¤¹¤ë¤ÈOK¤Ç¤·¤¿¡£ È÷¹Í¡§¥­¡¼¥¹¥È¥¢¥Õ¥¡¥¤¥ë̾¤Ï¥×¥í¥¸¥§¥¯¥È̾.keystore¡¢Key Alias¤Ï¥×¥í¥¸¥§¥¯¥È̾¤È¤¹¤ì¤ÐOK È÷¹Í¡§Publisher̾¤Ïpapuu.jp¡¢Éô½ð̾¤Ïapps¤È¤·¤¿¡£
  • ¸Å¤¤UI¤ÎGoogle Play Developer Console¾å¤«¤éapk¥Õ¥¡¥¤¥ë¤ò¥¢¥Ã¥×¥í¡¼¥É¤¹¤ë¤È¤­³«»Ï»þ¤Ë¼ºÇÔ¤·¤Þ¤¹(¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¡Öapk¤ò¥µ¡¼¥Ð¡¼¤Ç½èÍý¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡×)¡£Google Play Developer Console¥µ¥¤¥È±¦¾å¤Î¡Ö¿·¤·¤¤¥Ç¥¶¥¤¥ó¤ò»î¤¹¡×¥Ü¥¿¥ó¤«¤é¿·¤·¤¤¥Ç¥¶¥¤¥ó¤ËÀÚ¤êÂؤ¨¤ë¤ÈOK

Android¥¢¥×¥ê¤Ïapk¥Õ¥¡¥¤¥ë¤òa¥¿¥°¤Îsrc¤Ç»ØÄꤹ¤ì¤Ð¸ø³«¤Ç¤­¤Þ¤¹¡£¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¤È¤­¤Ï¼¡¤ÎMIME type¤òÀßÄꤷ¤Þ¤¹¡£
.htaccess

AddType application/vnd.android.package-archive apk

ActionBar

Android 3.0°Ê¹ß¤ÎüËö¤Ë¤Ï¥ª¥×¥·¥ç¥ó¥á¥Ë¥å¡¼¤òɽ¼¨¤¹¤ë¤¿¤á¤Î¥Ï¡¼¥É¥­¡¼¤¬¤Ê¤¤Êª¤¬Â¿¤¤¤½¤¦¤Ç¡¢ Âå¤ï¤ê¤ËAction Bar¤È¤¤¤¦¥á¥Ë¥å¡¼ÍѤο·¤·¤¤¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò²èÌ̾å¤Ëɽ¼¨¤µ¤»¤ë¤³¤È¤¬¿ä¾©¤µ¤ì¤Æ¤¤¤ë¤½¤¦¤Ç¤¹¡£

TIPS

Ti.4.0.0.GA¤Î¥Æ¡¼¥Þ¤ÇActionBar¤ò̵¸ú²½¤¹¤ëÊýË¡
windowActionBar false

Ti.4.0.0.GA¤Î¥Æ¡¼¥Þ¤ÇActionBar¤Î¾å¤ÎºÙ¤¤¥Ð¡¼¤ò¾Ã¤¹ÊýË¡
android:windowNoTitle true

Ti.3.3°Ê¹ß¥Ç¥Õ¥©¥ë¥È¤Çɽ¼¨¤µ¤ì¤ëActionBar¤òÈóɽ¼¨¤È¤¹¤ëÊýË¡

  • ¥Æ¡¼¥Þ¤ò¥«¥¹¥¿¥Þ¥¤¥º
  • activity.actionBar.hide()

navBarHidden¤Ï¸ú¤­¤Þ¤»¤ó¡£

¥¢¥¤¥³¥ó

¥ê¥ó¥¯

API¥ì¥Ù¥ë

ºÇ¿·¤Î¥·¥§¥¢¤Ï¤³¤Á¤é

Android¥Ð¡¼¥¸¥ç¥óAPI¥ì¥Ù¥ë¥³¡¼¥É¥Í¡¼¥à2015-11-24»þÅÀ¤Î¥·¥§¥¢2014-11-03»þÅÀ¤Î¥·¥§¥¢2014-04-01»þÅÀ¤Î¥·¥§¥¢È÷¹Í
2.2.x8Froyo0.2%0.6%1.1%
2.3.09Gingerbread
2.3.1
2.3.2
2.3.310Gingerbread MR13.8%9.8%17.8%Titanium SDK Ver.3.1.2°Ê¹ß¤ÎMin Ver.
2.3.4
2.3.5
2.3.6
2.3.7
3.0.x11Honeycomb0.1%ActionBar¤òÍøÍѤ¹¤ë»þ¤ÎMin ver.
3.1.x12Honeycomb MR1
3.2.x13Honeycomb MR2
4.0.014Ice Cream SandwichExpanding and collapsing action items¤òÍøÍѤ¹¤ë»þ¤ÎMin ver.
4.0.1
4.0.2
4.0.315Ice Cream Sandwich MR13.3%8.5%14.3%
4.0.4
4.1.x16Jelly Bean11.0%22.8%34.4%
4.2.x17Jelly Bean MR113.9%20.8%18.1%
4.3.x18Jelly Bean MR24.1%7.3%8.9%
4.4.x19KitKat37.8%30.2%5.3%
4.4w20KitKat ¥¦¥§¥¢¥Ö¥ëüËö³ÈÄ¥
5.021Lollipop15.5%
5.0.1
5.0.2
5.122Lollipop MR110.1%
6.023Marshmallow0.3%

»²¹Í¥Ú¡¼¥¸

AndroidÈdz«È¯»þ¤ÎÃí°ÕÅÀ(iPhone¥¢¥×¥ê³«È¯¤ò´ð½à¤È¤·¤¿°ã¤¤¡£¼ç¤ËTitanium SDK¤Î¥Ð¡¼¥¸¥ç¥ó 2.1.2GA°Ê¹ß¤Ç»î¤·¤¿¾ðÊó¤Ç¤¹)

  1. ²èÁü¤òÆɤ߹þ¤à¤È¤­'/image/foo.png'¤Î¤è¤¦¤Ë¥¹¥é¥Ã¥·¥å¤«¤é»Ï¤á¤Ê¤¤¤ÈAndroid¤Ç¤Ï¥¨¥é¡¼¤È¤Ê¤ë¡£
  2. touchstart¥¤¥Ù¥ó¥È¤Ê¤É¤Ç¥¹¥¯¥ê¡¼¥óºÂɸ·Ï¤ÎglobalPoint¤ò»ÈÍѤ¹¤ë¤È¥¨¥é¡¼¤È¤Ê¤ë¡£ ... ¸µ¡¹DEPRECATED¤È¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¢iPhone¤Ç¤âx/y¤Ç¼èÆÀ¤·¡¢source¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ë±þ¤¸¤ÆglobalPoint¤òµá¤á¤¿Êý¤¬Îɤµ¤½¤¦¤Ç¤¹¡£
  3. ImageView¤ÇÇطʲèÁü¤Î¥ê¥Ô¡¼¥È¤ò»ØÄꤷ¤Æ¤â¡¢¥¤¥á¡¼¥¸ÏÈ°ìÇդ˳ÈÂçɽ¼¨¤µ¤ì¤ë¡£ ... WebView¤Ç¤ÏAndroid¤Ç¤â¥ê¥Ô¡¼¥È¤·¤Æ¤¤¤Þ¤·¤¿¡£¤·¤ç¤¦¤¬¤Ê¤¤¤Î¤ÇImageView¤ÇÇطʤòÉߤ­µÍ¤á¤ë¤È¤­¤ÏAndroid¤À¤±Â礭¤á¤ËÉߤ­µÍ¤á¤¿Ê̲èÁü¤òÍÑ°Õ¤·¤Þ¤¹¡£
  4. ImageView¤ÎÃæ¤ËImageView¤Ê¤É¤òÆþ¤ì»Ò¤Ë¤¹¤ë¤È¡¢Æþ¤ì»Ò¤Ë¤·¤¿¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬É½¼¨¤µ¤ì¤Ê¤¤¡£Android¤Ç¤âÆ°¤¯¤è¤¦¤Ë¤¹¤ë¤¿¤á¤Ë¤ÏView¤Ëadd¤·¤Ê¤¤¤È¤¤¤±¤Ê¤¤¡£
  5. ¤¢¤ë¥¦¥£¥ó¥É¥¦¤Çadd¤·¤Æ¤¤¤ëview¤ò¡¢¤½¤³¤«¤é³«¤¤¤¿Ê̤Υ¦¥£¥ó¥É¥¦¤Ë¤âadd¤·¤¿¤È¤­¤ÎÆ°ºî¤¬iOS¤ÈAndroid¤Ç°ã¤¦¡£iOS¤Ç¤ÏξÊý¤Î¥¦¥£¥ó¥É¥¦¤Çɽ¼¨¤µ¤ì¤ë¡£Android¤Ç¤Ï³«¤¤¤¿¥¦¥£¥ó¥É¥¦¤Çɽ¼¨¤µ¤ì¤º¡¢Ìá¤Ã¤¿¤È¤­¤Ë¸µ¤Î¥¦¥£¥ó¥É¥¦¤Ç¤â¾Ã¤¨¤Æ¤¤¤ë¡£ºÇ½é¤«¤éview¤Ï£±¤Ä¤Î¥¦¥£¥ó¥É¥¦¤Ë½ê°¤¹¤ë¤Î¤òÁ°Äó¤È¤¹¤ë¤Î¤¬Àß·×¾å¤âÎɤµ¤½¤¦¡£remove¤·¤Æ¤«¤éadd¤¹¤ë¤«¡¢view¤ò¥³¥Ô¡¼¤·¤Æadd¤¹¤ë¤«¤ÇÂбþ¤¹¤ë¡£
  6. iPhone: Label¤Ê¤É¤Çwidth, height¤ò»ØÄꤷ¤Ê¤¤¤È0¤È¤Ê¤ë¡£
    Android: Label¤Ê¤É¤Çwidth, height¤Ïʸ»úÎó¤Ë¹ç¤ï¤»¤ÆÀßÄꤷ¤Æ¤¯¤ì¤ë¡£
  7. iPhone: Label¤Ê¤É¤Ç¾å²¼°ÌÃÖ¤ò»ØÄꤷ¤Ê¤¤¤È¤­¾å´ó¤»¤È¤Ê¤ë¡£
    Android: Label¤Ê¤É¤Ç¾å²¼°ÌÃÖ¤ò»ØÄꤷ¤Ê¤¤¤È¤­¾å²¼Êý¸þ¤ÎÃæ±û´ó¤»¤È¤Ê¤ë¡£
  8. iPhone: TextArea¤Îheight¤òauto¤È¤·¤¿¤È¤­¡¢¹Ô¿ô¤¬ÊѤï¤Ã¤Æ¤â¹â¤µ¤ÏÊѤï¤é¤Ê¤¤¡£
    Android: TextArea¤Îheight¤òauto¤È¤·¤¿¤È¤­¡¢ÆþÎϤ·¤¿¹Ô¿ô¤Ë¤è¤Ã¤Æ¹â¤µ¤¬ÊѤï¤ë¡£
  9. ¥ª¥Ö¥¸¥§¥¯¥È¥×¥í¥Ñ¥Æ¥£¤¬Ì¤ÄêµÁ¤Î¾ì¹ç¤Ë¡¢iPhone¤Ïundefined¡¢Android¤Ïnull¤Ë¤Ê¤ë ... Âкö¡§¡Ö=== undefined¡×¤Ç¤Ê¤¯¡Ö== undefined¡×¤ÇÈæ³Ó¤¹¤ë
  10. ¡ÖcreateWindow({orientationMode:[Ti.UI.PORTRAIT]});¡×¤È¤·¤¿¤È¤­¤ËAndroid¤À¤±½Ä¸ÇÄê¤È¤Ê¤é¤Ê¤¤¡£ ... Âкö¡§¡Övar win = createWindow(); win.orientationMode = [Ti.UI.PORTRAIT];¡×¤È¤¹¤ë
  11. Android: Ti.Network.HTTPClient¤ÈTi.UI.WebView¤Çcookie¤Ï¶¦Í­¤µ¤ì¤Ê¤¤¡£Ti.Network.HTTPClientƱ»Î¤Ç¤â¡¢cookie¤Ï¶¦Í­¤µ¤ì¤Ê¤¤¡£
  12. Android: ScrollView¤Çcreate»þ¤Ë¡ÖshowHorizontalScrollIndicator: true¡×¤È¤·¤Ê¤¤¤È¥¹¥¯¥í¡¼¥ë¤·¤Ê¤¤
  13. Android: evalJS¤ÇÊ£¿ô¹Ô¤Î¼Â¹Ô¤¬¤Ç¤­¤Ê¤¤¡ÊevalJS('a = xx; b = yy';);¡Ë ... Âкö¡§£±¹Ô¤º¤Äɾ²Á¤¹¤ë¡ÊRhino¤Îº¢¤ÎÏäʤΤǡ¢Ä¾¤Ã¤Æ¤¤¤ë¤«¤â¡Ë
  14. Android: WebViewÆâ¤Ç»ÈÍѤ·¤Æ¤¤¤ëjs¥Õ¥¡¥¤¥ë¤Î³ÈÄ¥»Ò¤òÊѤ¨¤Ê¤¤¤È¡¢Distribute¤¹¤ë¤È¤­¤À¤±apk¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤Ê¤¤¡£
  15. ¡ÖJSON.parse(file.read().text);¡×¤È¤¤¤¦¤è¤¦¤Ë¡Ö.text¡×¤òÆþ¤ì¤Ê¤¤¤È¥Ñ¡¼¥¹¥¨¥é¡¼¤È¤Ê¤ë¡£
  16. 2Îó¥Ô¥Ã¥«¡¼¤Î¥³¡¼¥É¤¬°ã¤¦
    Titanium Android:2ÎóPicker | ¤â¤®¤Ã¤Á¤ã¤¦¤¾¤â¤®»äŪ¥á¥â
  17. Ï¢ÍíÄ¢¡ÊÅÅÏÃÄ¢¡ËÏ¢·È¤Î¥³¡¼¥É¤¬°ã¤¦
    ¥¢¥×¥êÏ¢·È¤ÇIntent¤ò»È¤¦¡£Ä¶Àä´Êñ | ¤â¤®¤Ã¤Á¤ã¤¦¤¾¤â¤®»äŪ¥á¥â
  18. TabÆâWindow¤Îfocus¥¤¥Ù¥ó¥È¤ò¼è¤ì¤Ê¤¤¡¢¥Æ¡¼¥Ö¥ë¤ÇSection¤¬Ìµ¤¤
    Titanium¼ÂÁõ¥Î¥¦¥Ï¥¦¤Î£² | Excite Smartphone Engineer's Blog ... Android¤Ç¼è¤ëÊýË¡¡¢Section¤Ã¤Ý¤¤TableViewRow¤òɽ¼¨¤¹¤ëÊýË¡
  19. Ti.Platform.locale¤ÎÃͤ¬°ã¤¦ iOS: ja, en, ... Android: ja-JP, en-US, ...

    ´ØÏ¢url

Android TIPS

Android splash²èÌ̤ǥ¿¥¤¥È¥ë¥Ð¡¼¤ª¤è¤Ó¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤òɽ¼¨¤·¤Ê¤¤ÊýË¡

tiapp.xml¤ò³«¤­¡¢¼¡¤ÎÃͤò¤¹¤Ù¤Ætrue¤È¤·¤Þ¤¹¡£

    <statusbar-hidden>true</statusbar-hidden>
    <fullscreen>true</fullscreen>
    <navbar-hidden>true</navbar-hidden>

Android TIPS¥ê¥ó¥¯