Build.VERSION.SDK_INT には、フレームワークの SDK バージョンが数値ではいっています。この数値は Build.VERSION_CODES で定数として定義されているので、比較することで任意のビルドバージョンで処理をわけることができます。
if(Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD_MR1) {
// 2.3.3 向けの処理
} else {
// 2.3.3 以外向けの処理
}
if(Integer.parseInt(Build.VERSION.SDK) == Build.VERSION_CODES.CUPCAKE) {
// for 1.5
}
else {
switch(Build.VERSION.SDK_INT) {
case Build.VERSION_CODES.DONUT:
// for 1.6
break;
case Build.VERSION_CODES.ECLAIR_MR1:
// for 2.1
break;
case Build.VERSION_CODES.FROYO:
// for 2.2
break;
case Build.VERSION_CODES.GINGERBREAD:
// for 2.3
break;
case Build.VERSION_CODES.GINGERBREAD_MR1:
// for 2.3.3
break;
case Build.VERSION_CODES.HONEYCOMB:
// for 3.0
break;
default:
break;
}
}
・ 主な Build.VERSION_CODES の定数
CUPCAKE
May 2009: Android 1.5
DONUT
September 2009: Android 1.6
ECLAIR
November 2009: Android 2.0
ECLAIR_0_1
December 2009: Android 2.0.1
ECLAIR_MR1
January 2010: Android 2.1
FROYO
June 2010: Android 2.2
GINGERBREAD
November 2010: Android 2.3
GINGERBREAD_MR1
Almost newest version of Android, version 2.3.3
HONEYCOMB
Newest version of Android, version 3.0
# Build.VERSION.SDK に数字以外の文字列が入ると
# NumberFormatException になります。
# 安全なコードにしたいなら、try-catch するか、
# if(Build.VERSION.SDK.equals(String.valueOf(Build.VERSION_CODES.CUPCAKE)))
# なのかなぁ。
# ちなみに、Android Developers Blog: How to have your (Cup)cake and eat it too
# では、parseInt() 使ってました。
Nice post! I really enjoy this blog
返信削除Android Online Course
kayseriescortu.com - alacam.org - xescortun.com
返信削除On your place I would make a video about this build version and publish it on youtube. If you want to lead youtube channel all the time use this site https://soclikes.com/ to get subscribers for your channel
返信削除ビデオを作成してtiktokに投稿したい場合は、私はあなたにアドバイスしますTiktokの「いいね」の購入。
返信削除lab cabinet manufacturer
返信削除world777 bet
best tution classes in gurgaon
Flats in Jaipur
cloudkeeda
what is azure
azure free account
azure data factory
This post is invaluable. How can I find out more?
返信削除야한소설
대딸방
스포츠마사지
출장마사지
uşak eskort
返信削除kilis eskort
osmaniye eskort
siirt eskort
muş eskort
bartın eskort
sivas eskort
şile eskort
ayvalık eskort
sultangazi eskort
kütahya eskort
返信削除çankırı eskort
afyon eskort
burdur eskort
çorum eskort
bilecik eskort
amasya eskort
yalova eskort
çorlu eskort
şile eskort
This is very interesting, You are a very skilled blogger.
返信削除토토사이트
경마사이트
경마
I am overwhelmed by your post with such a nice topic. Feel free to visit my website, thank you! 토토
返信削除It is really a great and helpful piece of info. I am glad that you shared this helpful information with us. Please keep us updated. Feel free to visit my website, thank you! 카지노사이트
返信削除The beauty of the words is that the same words can be used in a variety of ways to provide a different and unique meaning. You possess the nice and quite impressive style of writings that has touched my heart and soul. I shall come again to soothe my knowledge and skills thirst. Feel free to visit my website, thank you! 파워볼사이트
返信削除I am sure this piece of writing has touched all the internet users, its really really fastidious piece of writing on building up new weblog. Feel free to visit my website, thank you! 바카라사이트
返信削除Thank you for sharing this information. I read your blog and I can't stop my self to read your full blog. Again Thanks and Best of luck to your next Blog in future.스포츠토토
返信削除mobil sohbet https://mobil.sohbet.org
返信削除konyaaltı eskort
返信削除kuşadası eskort
lefkoşa eskort
malatya eskort
manavgat eskort
marmaris eskort
mersin eskort
muğla eskort
niğde eskort
ordu eskort
adana eskort
返信削除adapazarı eskort
afyon eskort
alanya eskort
amasya eskort
ankara eskort
antakya eskort
antalya eskort
artvin eskort
aydın eskort
çanakkale eskort
返信削除yozgat eskort
nevşehir eskort
gümüşhane eskort
kütahya eskort
tokat eskort
bayburt eskort
beylikdüzü eskort
istanbul eskort
burdur eskort
返信削除bursa eskort
çanakkale eskort
çankırı eskort
çorum eskort
denizli eskort
diyarbakır eskort
düzce eskort
edirne eskort
elazığ eskort
eskişehir eskort
返信削除erzincan eskort
erzurum eskort
giresun eskort
gümüşhane eskort
zonguldak eskort
hatay eskort
ığdır eskort
ısparta eskort
istanbul eskort
nevşehir eskort
返信削除niğde eskort
ordu eskort
osmaniye eskort
rize eskort
sakarya eskort
samsun eskort
siirt eskort
sinop eskort
şırnak eskort
artvin eskort
返信削除aydın eskort
balıkesir eskort
bartın eskort
batman eskort
bayburt eskort
bilecik eskort
bingöl eskort
bitlis eskort
bolu eskort
kocaeli eskort
返信削除kırşehir eskort
konya eskort
kütahya eskort
malatya eskort
manisa eskort
mardin eskort
mersin eskort
muğla eskort
muş eskort
eskişehir eskort
返信削除erzincan eskort
erzurum eskort
giresun eskort
gümüşhane eskort
hatay eskort
ığdır eskort
ısparta eskort
istanbul eskort
izmir eskort
kırşehir eskort
返信削除konya eskort
kütahya eskort
malatya eskort
manisa eskort
mardin eskort
mersin eskort
muğla eskort
muş eskort
nevşehir eskort
niğde eskort
返信削除ordu eskort
osmaniye eskort
rize eskort
sakarya eskort
samsun eskort
siirt eskort
sinop eskort
şırnak eskort
sivas eskort
tekirdağ eskort
返信削除tokat eskort
trabzon eskort
tunceli eskort
urfa eskort
uşak eskort
van eskort
yalova eskort
yozgat eskort
zonguldak eskort
Thanks for sharing such great information. It was really helpful to me. 릴게임
返信削除This is one very interesting post. I like the way you write and I will bookmark your blog to my favorites. 바카라사이트
返信削除What an awesome post, I just read it from start to end your blog post. Really an informative blog. 바카라사이트
返信削除Thank you for sharing this useful article , and this design blog simple and user friendly regards. 바둑이게임
返信削除Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I have bookmarked more article from this website. Such a nice blog you are providing. Feel free to visit my website; 바카라사이트닷컴
返信削除spins. Almost every game is free spins. Let's get to know betflix
返信削除This is very well written information. I am sure anyone using it will benefit from it. Keep it up! You can get Indian visa online easily.
返信削除smm panel
返信削除smm panel
iş ilanları
instagram takipçi satın al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
servis
tiktok jeton hilesi
özel ambulans
返信削除nft nasıl alınır
uc satın al
en son çıkan perde modelleri
en son çıkan perde modelleri
lisans satın al
yurtdışı kargo
minecraft premium
At least nine people are also known to have died since Saturday while swimming in lakes and rivers.
返信削除카지노 드라마
But this was one of the first times the heat has caused such an issue in England, remarkably at its most northerly international ground.
返信削除온라인 카지노
返信削除will be praised anywhere. I am a columnist This post is really the best on this valuable topic 검증카지노