iOS開発者の為の Android講座
App Developer(自称 )の dommyによる
04/12/2023
何が違う?iOS Android
Language Objective-C/C/C++ Java/C/C++ & XML
Model Core Data ContentProvider
View Interface Builder XML
Controller UIViewController Activity/Fragment
Display size 320x480 / 640x960 /768x1024
480x800 and so on…
Presented by dommy on 2
04/12/2023
APIの対応は?iOS Android
Base UIApplication Application
Controller UIViewController Activity/Fragment
Event Emitter Target Action/Responder Chain
Event Listener i.e. onClick()
Data Saving NSUserDefaults / SQLite SharedPreferences / SQLite
Multi Thread NSThread Thread/AsyncTask/Service
Internationalization
NSLocalizedString Resource files
GPS CoreLocation LocationManagerfor MapView, use Google SDK
Accelerometer UIAccelerometer SensorManager
Local Notification UILocalNotification NotificationManager
Remote Push Notification
Apple Push Notifiation Service
C2DM (external package)com.google.android.c2dm
Presented by dommy on 3
04/12/2023Presented by dommy on 4
Not on memory
Invisible
Visibleタッチイベント受付
UIViewController Lifecycle
-initWithNibName: Bundle:
-loadView
-viewDidLoad
-viewWillAppear:
-viewDidAppear: -viewWillDisappear:
-viewDidDisappear:
-viewDidUnload
-dealloc
instantiation release
04/12/2023
Visible
Fragment Lifecycle
Presented by dommy on 5
Not on memory
Invisible
タッチイベント受付
onAtach()
onCreate()
onCreateView()
onStart()
onResume() onPause()
onStop
onDestroy()
onDetach()
instantiation release
onDestroyView()
fragmentが、back stackにある
時
04/12/2023
User Interface Design
Presented by dommy on 6
UINavigationBar
UITableView
RelativeLayout
TextView
TextView
TextView
LinearLayout
TextView
TextView
この Viewイメージの作成に、それぞれ、何行のテキストを書くでしょうか?
04/12/2023
User Interface Design 2
Presented by dommy on 7
iPhoneは 0行Androidは 39行 と、思いきや
• style.xml• colors.xml• drawable.xmlなどで、約 500行ほどの作業になる。
04/12/2023
Conclusion
何でも出来る! iOSに比べ、アプリの制約が少ない。 アプリ間の連携や SIMにまでアクセス出来る。 デザイン上の自由度はかなり高い。
何にも無い! UIパーツやアニメーションなんてほとんど無い。 イメージなども SDKに無い。 デフォルトのアクションみたいなものが無い。
なんだかんだ、大体同じ事が出来る!
Presented by dommy on 8
04/12/2023
Appendix A - XML
Presented by dommy on 9