Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Like this? Share it with your network

Share

TitaniumによるiPhone/Androidアプリ開発

on

  • 13,664 views

Titanium Mobileを用いたiPhoneアプリ開発について、実例をまじえつつ概説します。OAuthを利用したTwitter APIへのアクセスについても実例をおみせします。

Titanium Mobileを用いたiPhoneアプリ開発について、実例をまじえつつ概説します。OAuthを利用したTwitter APIへのアクセスについても実例をおみせします。

Statistics

Views

Total Views
13,664
Views on SlideShare
11,113
Embed Views
2,551

Actions

Likes
18
Downloads
118
Comments
0

17 Embeds 2,551

http://d.hatena.ne.jp 2037
http://wiki.onakasuita.org 144
http://developer.hatenastaff.com 138
http://asomile.blogspot.jp 84
http://asomile.blogspot.com 47
http://s.deeeki.com 38
https://10.1.5.178 29
http://172.17.120.14 10
https://asomile.blogspot.com 8
https://10.1.1.117 7
http://webcache.googleusercontent.com 2
https://cybozulive.com 2
http://strobo.dip.jp 1
http://asomile.blogspot.tw 1
http://stanaka.hatenadiary.com 1
http://183.181.20.15 1
http://www.cloudwork.info 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

TitaniumによるiPhone/Androidアプリ開発 Presentation Transcript

  • 1. TitaniumiPhone/Android
  • 2. ( id:r_kurain, @kurain ) / ( iPhone, iPad )Monolith (iPhone)
  • 3. Titanium blog TitaniumTitanium Android !
  • 4. AgendaiPhoneTitaniumTitanium
  • 5. TitaniumJavascript iPhone/Android “ ”Titanium MobileAppceleratorApache License v2.0 Titanium Web
  • 6. Appcelerator Titanium Desktop $9m Paypal @masuidrive
  • 7. OS X Snow LeopardXCode + iOS SDK (4.2 )Android SDK (Android )
  • 8. Project Name README/LICENSE/CHANGELOG/tiapp.xml Resources iphone Default.png appicon.png
  • 9. var tabGroup = Titanium.UI.createTabGroup();var win1 = Titanium.UI.createWindow({ title:Tab 1, backgroundColor:#fff});var tab1 = Titanium.UI.createTab({ icon:KS_nav_views.png, title:Tab 1, window:win1});tabGroup.addTab(tab1);tabGroup.open();
  • 10. var win1 = Titanium.UI.createWindow({ title:Tab 1, backgroundColor:#fff});var label = Titanium.UI.createLabel({ text:Hello World,});win1.add(label);win1.open();
  • 11. (2 )
  • 12. Twitter Client Twitter Client OAuth Tweet
  • 13. KitchenSink Sample https://github.com/appcelerator/KitchenSink project import
  • 14. TableViewTweet TimelineUITableViewTitanium.UI.TableView Ti.UI.TableViewRow
  • 15. table_view.jsvar data = [];var tableView =Ti.UI.createTableView( {!! data:data! });!Ti.UI.currentWindow.add(tableView);
  • 16. JS createWindowvar win = Titanium.UI.createWindow( { title:Tab 1, url:table_view.js, backgroundColor:#fff });
  • 17. Tweet API TweetTitanium.Network.HTTPClient
  • 18. HTTP Request Ti.Network.HTTPClientvar screen_name = kurain;var url = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name="+screen_name;var xhr = Ti.Network.createHTTPClient();xhr.open("GET",url);xhr.onload = function() { var tweets = JSON.parse(this.responseText);}xhr.send();
  • 19. Callbackxhr.onload = function() { var tweets = JSON.parse(this.responseText); var data = []; for(var i=0;i<tweets.length;i++) { var row = Ti.UI.createTableViewRow(); var label = Ti.UI.createLabel( { text: tweets[i].text } ); row.add(label); data.push(row); } var tableView = Titanium.UI.createTableView( {! ! data:data! } ); Titanium.UI.currentWindow.add(tableView);}
  • 20. Demo
  • 21. Twitter IconTweet margin
  • 22. Ti.UI.ImageViewvar url = tweets[i].user.profile_image_urlvar image = Ti.UI.createImageView( { image:url, left: 0, width: 48, height: 48 });row.add(image);
  • 23. Pull to refreshDynamic ScrollingEdit and Move
  • 24. OAuthAPI OAuthoauth-adapter http://code.google.com/p/oauth-adapter/ Javascript OAuth library
  • 25. OAuth-AdapterTi.include(oauth_adapter.js);var oAuthAdapter = new OAuthAdapter( your-consumer-secret, your-consumer-key, HMAC-SHA1);oAuthAdapter.loadAccessToke(twitter);
  • 26. OAuth SendoAuthAdapter.send( https://api.twitter.com/1/statuses/update.json, [[status, @kurain Say Hello to#titanium!]], Twitter, //Message Title Published., //Succeed Message Not published. //Failed Message);
  • 27. OAuthif (oAuthAdapter.isAuthorized() == false) { var receivePin = function() { oAuthAdapter.getAccessToken( https://api.twitter.com/oauth/access_token ); oAuthAdapter.saveAccessToken(twitter); }; oAuthAdapter.showAuthorizeUI( https://api.twitter.com/oauth/authorize? + oAuthAdapter.getRequestToken( https://api.twitter.com/oauth/request_token ), receivePin );}
  • 28. OAuthstatus OAuth
  • 29. NavigationBarvar r = Titanium.UI.createButton( {! systemButton:Titanium.UI.iPhone.SystemButton.ADD });//addEventListener !!r.addEventListener(click,function() {! tweet(Hoge!); });Titanium.UI.currentWindow.setRightNavButton(r);
  • 30. Objective-C PluginTiBar Barcode@masuidrive AdMob plugin
  • 31. OpenGLclose
  • 32. AndroidOS debugger
  • 33. titanium-mobile-doc-ja http://code.google.com/p/titanium-mobile-doc-ja/ API , PDF, Build Rakefile, etc.. id:donayama
  • 34. Titanium OAuth
  • 35. Thank you.