SlideShare a Scribd company logo
1 of 94
Download to read offline
MADRID · NOV 21-22 · 2014 
From iOS To Android(or reverse) 
José Manuel Ortega Candel 
@jmortegac 
http://www.linkedin.com/jmortega1
MADRID · NOV 21-22 · 2014 
https://speakerdeck.com/jmortega/
MADRID · NOV 21-22 · 2014 
ARCHITECTURE / iOS / ANDROID 
TOOLS XCODE vs ANDROID STUDIO 
APPLICATIONS / PERMISSIONS / PRIVACY 
USER INTERFACE 
STATIC ANALYSIS CODE / TESTING 
CERTIFICATES AND SIGNING 
EMULATORS / MEMORY MANAGEMENT/ DATABASE 
APP PUBLISHING / DEVELOPER LIBRARIES
MADRID · NOV 21-22 · 2014 
ARCHITECTURE
MADRID · NOV 21-22 · 2014 
Android Architecture 
DALVIK 
ART 
Just-In-Time (JIT) Compilation 
Ahead-Of-Time (AOT) Compilation 
Cache builds up over time 
Boot times are faster 
Cache is built at first boot Rebooting device takes significantly longer 
Apps compiled when executed 
Stores Compiled Apps 
Consumes much more internal storage space
MADRID · NOV 21-22 · 2014 
iOS Architecture
MADRID · NOV 21-22 · 2014 
TOOLS
MADRID · NOV 21-22 · 2014 
IDES 
Android 
iOS 
https://developer.android.com/sdk/ installing/studio.html 
APPCode 
http://www.jetbrains.com/objc/
MADRID · NOV 21-22 · 2014 
on Android Studio 
InteliJ IDE Based 
Maven based Build Dependency 
Combines Ant && Maven / Gradle Tasks
MADRID · NOV 21-22 · 2014 
Android Studio 
Templates
MADRID · NOV 21-22 · 2014 
Android Studio 
Project settings
MADRID · NOV 21-22 · 2014 
XCode 
Provides multiple ios app templates
MADRID · NOV 21-22 · 2014 
Xcode Project 
Testing on device 
Base SDK
MADRID · NOV 21-22 · 2014 
Interface Builder
MADRID · NOV 21-22 · 2014 
Instruments on iOS 
Debugging, performance analysis, and testing 
Real-time CPU, memory, disk, energy, and network usage 
Threads, network, and energy usage 
I/O system and thread activity 
Allows detecting memory leaks
MADRID · NOV 21-22 · 2014 
APPLICATIONS
MADRID · NOV 21-22 · 2014 
Android Applications
MADRID · NOV 21-22 · 2014 
Android Layout Manager+ Device Preview
MADRID · NOV 21-22 · 2014 
Android Applications 
import android.os.Bundle; 
import android.app.Activity; 
public class MainActivity extends Activity { 
@Override 
protected void onCreate(Bundle savedInstanceState){ 
super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_main);} 
} 
public static void invokeWebBrowser(Activity activity){ 
Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.google.com")); 
activity.startActivity(intent); 
} 
Activity 
Intents [Explicit,Implicits] 
Services 
Content Providers[Sharing data between apps] 
Fragments from 3.0
MADRID · NOV 21-22 · 2014 
Android components
MADRID · NOV 21-22 · 2014 
Android’s RecyclerView 
Adapter 
ViewHolder 
LayoutManager 
ItemDecoration 
ItemAnimator 
https://developer.android.com/training/material/lists-cards.html
MADRID · NOV 21-22 · 2014 
Android Navigation Drawer
MADRID · NOV 21-22 · 2014 
Layout Systems 
UINavigationBar 
UITableView 
TextView 
TextView 
LinearLayout 
TextView 
TextView
MADRID · NOV 21-22 · 2014 
LifeCycle Applications
MADRID · NOV 21-22 · 2014 
LifeCycle Applications 
- (BOOL)application:(UIApplication *)application 
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
self.window.rootViewController = self.navigationController; 
[self.window makeKeyAndVisible]; 
return YES; 
}
MADRID · NOV 21-22 · 2014 
iOS Applications 
C 
Objective –C,[message passing] 
Swift 
PlayGround for leaning Swift 
Programming with Objetive-C in windows/ linux 
http://www.gnustep.org/ 
https://developer.apple.com/swift
MADRID · NOV 21-22 · 2014 
Objective-C vs Swift 
NSString *string = @“hello”; 
let string = "hello" as NSString 
let s: NSString = "hello" 
var string: NSString = "hello" 
string= "Hello" 
NSLog(@“This is a string”); 
println("This is a string"); 
NSArray *myArray = [NSArray arrayWithObjects:@“string1", @“string2", nil]; 
var myArray = [“string1", "string2"] 
var myArray : [String] = [“string1", "string2"]
MADRID · NOV 21-22 · 2014 
iOS Applications 
@synthesize will generate getter and setter methods for your @property 
@interface MyObject:NSObject { 
NSString *_name; 
} 
@property (nonatomic,assign) NSString* name; 
@end 
@implementation MyObject 
@synthesize name = _ name; 
@end
MADRID · NOV 21-22 · 2014 
UIKit Framework 
UIButton 
UILabel 
UIImageView 
UITextField 
UIPickerView 
UIWindow 
UIView 
UIViewController 
NSObject,NSString,NSMutableString, NSDate,NSNumber 
Collections(NSArray, NSDictionary, NSSet,NSEnumerator) 
Foundation Framework
MADRID · NOV 21-22 · 2014 
iOS Applications 
UIViewController is the parent for view Controllers
MADRID · NOV 21-22 · 2014 
iOS Applications 
Organizer
MADRID · NOV 21-22 · 2014 
iOS Applications 
Snippets in XCode
MADRID · NOV 21-22 · 2014 
iOS Applications
MADRID · NOV 21-22 · 2014 
iOS Applications 
#import <UIKit/UIKit.h> 
@interface MyViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>{ 
IBOutlet UITableView *table; 
NSMutableData *dataReceive; 
} 
@property(nonatomic,assign) NSMutableData *dataReceive; 
@end 
UIViewController interface MyViewController.h 
implementation MyViewController.m 
@implementation MyViewController 
@synthesize dataReceive,table; 
- (void)viewDidLoad{ 
[super viewDidLoad]; 
NSURL *url = [[NSURL alloc] initWithString:@“url"]; 
self.dataReceive = [[NSMutableData data] retain]; 
}
MADRID · NOV 21-22 · 2014 
iOS Applications 
UINavigationController
MADRID · NOV 21-22 · 2014 
iOS Applications 
UINavigationController 
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; 
//Recuperamos el ViewController 
UIViewController *rootViewController = [storyboard instantiateInitialViewController]; 
// Creamos un UINavigationController, que se encargará de controlar y almacenar los distintos viewControllers de nuestra aplicación. 
UINavigationController *navigationController = [[UINavigationController alloc]initWithRootViewController:rootViewController]; 
//Asignamos el navigationController como principal. 
self.window.rootViewController = navigationController; return YES; 
} 
-(IBAction)goToPantalla2:(id)sender { 
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; 
//Obtenemos el controlador con Identifier "Pantalla2" 
Pantalla2ViewController *pantalla2Controller = [storyBoard instantiateViewControllerWithIdentifier:@"Pantalla2"]; 
//Lanzamos el controlador en el navigation de forma animada: [self.navigationController pushViewController:pantalla2Controller animated:YES]; }
MADRID · NOV 21-22 · 2014 
Design patterns on iOS Applications 
MVC 
Target-action 
Delegate and protocols 
A delegate is an object that control of the user interface for that event.
MADRID · NOV 21-22 · 2014 
ViewPager / UIPageViewController 
Swipe gesture
MADRID · NOV 21-22 · 2014 
Multilanguage 
NSString *localizedString = NSLocalizedString(@"Hello",@“DefaultString");
MADRID · NOV 21-22 · 2014 
Certificates and Signing 
Android 
iOS 
Self-signed certificate 
Apps are signed by developers 
Apple certificate 
Apps are signed by Apple 
Java Keytool 
Generate a distribution provisioning profile 
Export + Sign APK 
iOS Provisioning Portal 
Debug and distribution certificate 
App ID (unique ID of your app) 
Set of device unique identifiers 
Developer certificate
MADRID · NOV 21-22 · 2014 
Android Studio 
Export + Sign APK
MADRID · NOV 21-22 · 2014 
PERMISSIONS
MADRID · NOV 21-22 · 2014 
Permissions on Android 
AndroidManifest.xml 
Protection mechanism to interact with other applications 
<uses--‐permission android:name="android.permission.INTERNET"/> 
<uses--‐permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 
<uses--‐permission 
android:name="android.permission.ACCESS_COARSE_LOCATION"/> 
<uses--‐permission 
android:name="android.permission.ACCESS_FINE_LOCATION"/> 
<uses--‐permission 
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
MADRID · NOV 21-22 · 2014 
Permissions on iOS 
oDeclare your application requirements in its manifest-like Info.plist. This is used only for ensuring device compatibility. 
oUIRequiredDeviceCapabilities allows you to list ’hardware-like’ capabilities that your app needs. 
oAppStore reads this information for filter installer devices.
MADRID · NOV 21-22 · 2014 
Permissions on iOS 
Privacy Analysis Tools for iOs Applications 
patia.unileon.es
MADRID · NOV 21-22 · 2014 
Privacy 
Permission Manager
MADRID · NOV 21-22 · 2014 
USER INTERFACE
MADRID · NOV 21-22 · 2014 
Evolution
MADRID · NOV 21-22 · 2014 
Android Material design 
Minimalist and consistency 
Transitions, animiations 
Cards 
https://developer.android.com/training/material/get-started.html
MADRID · NOV 21-22 · 2014 
Android Material design 
Ldrawer 
https://github.com/kanytu/android-material-drawer-template 
https://github.com/IkiMuhendis/LDrawer 
<?xml version="1.0" encoding="utf-8"?> 
<resources> 
<style name="AppTheme" parent="android:Theme.Material.Light"> 
<item name="android:colorPrimary"> 
@color/primary</item> 
<item name="android:colorPrimaryDark"> 
@color/primary_dark</item> 
<item name="android:colorAccent"> 
@color/accent</item> 
<item name="android:textColorPrimary"> 
@color/text_primary</item> 
<item name="android:textColor"> 
@color/text_secondary</item> 
<item name="android:navigationBarColor"> 
@color/primary_dark</item> </style> </resources>
MADRID · NOV 21-22 · 2014 
Android Material design 
https://github.com/google/iosched
MADRID · NOV 21-22 · 2014 
Android Fragments 
Fragment is a chunk of user interface with its own life cycle. 
Fragment must exist within an Activity 
Interaction with fragments is done through FragmentManager 
Fragment API was introduced in API 11 
http://developer.android.com/tools/support-library
MADRID · NOV 21-22 · 2014 
Android Fragments
MADRID · NOV 21-22 · 2014 
iOS 
Master-Detail template 
UISplitViewController
MADRID · NOV 21-22 · 2014 
Notifications
MADRID · NOV 21-22 · 2014 
STATIC ANALYSIS CODE
MADRID · NOV 21-22 · 2014 
Static analysis code on Android Studio 
Inspect Profile 
Lint
MADRID · NOV 21-22 · 2014 
Static analysis code on Java projects 
SonarQube 
Sonnar-runner
MADRID · NOV 21-22 · 2014 
Static analysis code on XCode 
Static Analyzer 
Detect memory leaks
MADRID · NOV 21-22 · 2014 
TESTING
MADRID · NOV 21-22 · 2014 
Mobile Application Testing 
TYPES 
Unit Testing 
Functionality Testing 
Integration Testing 
Regression 
Load Testing 
Stress Testing 
Performance 
Usability Testing
MADRID · NOV 21-22 · 2014 
Mobile Application Testing
MADRID · NOV 21-22 · 2014 
CheckList 
Rotating the screen 
Behavior of when network is not available 
Navigation between screens 
Behavior of app if app is running for longer period of time and checking memory
MADRID · NOV 21-22 · 2014 
Testing on Android 
Unit & Integration,TDD 
 Junit 
RoboElectric 
Acceptance,BDD 
RobotiumTesting User Interface 
Calabash
MADRID · NOV 21-22 · 2014 
Unit testing on iOS 
XCTest 
#import <XCTest/XCTest.h> 
#import “TestObject.h" 
@interface TestOjectLogicTests : XCTestCase { 
@private 
TestObject *object; 
} 
@end
MADRID · NOV 21-22 · 2014 
EMULATORS
MADRID · NOV 21-22 · 2014 
Emulator vs Simulator 
Android 
iOS 
Emulator 
Simulator 
Very slow integrated with SDK 
Integrated with Xcode 
Emulates hardware and software 
Simulates only software 
Launched apps are equal binaries from the apps compiled for Device CPU 
Launched apps are different binaries from the apps compiled for Device CPU
MADRID · NOV 21-22 · 2014 
Genymotion 
Integration with Eclipse and Android Studio 
MULTI OS Compatible with Linux,Windows and Mac 
Requires VirtualBox
MADRID · NOV 21-22 · 2014 
Alternatives 
http://jimulabs.com/ for Android live preview 
https://appthwack.com/ for testing in the cloud with real devices
MADRID · NOV 21-22 · 2014 
MEMORY MANAGEMENT
MADRID · NOV 21-22 · 2014 
Android 
Handles memory management automatically 
Garbage Collector 
iOS 
release, retain, autorelease 
ARC(Automatic Reference Counting) 
Developer maintain the count number for each object 
Destroys object when reference counting become 0 
@autoreleasepool 
With ARC, compiler set this methods where its necessary
MADRID · NOV 21-22 · 2014 
ARC 
Migrating to ARC 
Project Build Settings
MADRID · NOV 21-22 · 2014 
DATA PERSISTENCE
MADRID · NOV 21-22 · 2014 
Android 
iOS 
SQLite 
android.database.sqlite 
Tables and relations 
Core Data 
Objects 
DataModel 
Content Providers 
/data/data/<Application-Package> /databases/<database-name> Only acces with root 
DataModel editor in Xcode for register objects and their relationships
MADRID · NOV 21-22 · 2014 
iOS Core Data
MADRID · NOV 21-22 · 2014 
Alernatives 
http://realm.io/ 
Android and iOS 
Object-oriented API 
C++ Core
MADRID · NOV 21-22 · 2014 
SHARED ACTIONS
MADRID · NOV 21-22 · 2014 
Android 
<?xml version="1.0" encoding="utf-8"?> 
<menu xmlns:android="http://schemas.android.com/apk/res/android" > 
<item 
android:id="@+id/share" 
android:title="@string/share" 
android:showAsAction="ifRoom" 
android:actionProviderClass="android.widget.ShareActionProvider"/> 
</menu> 
private ShareActionProvider mShareActionProvider; 
mShareActionProvider.setShareIntent(getDefaultShareIntent()); 
private Intent getDefaultShareIntent(){ 
Intent intent = new Intent(Intent.ACTION_SEND); //IMPLICIT INTENT 
intent.setType("text/plain"); 
intent.putExtra(Intent.EXTRA_TEXT,"Extra Text"); 
return intent;}
MADRID · NOV 21-22 · 2014 
iOS 
- (IBAction)shareButton:(UIBarButtonItem *)sender 
{ 
NSString *textToShare = @“textToShare"; 
UIImage *imageToShare = [UIImage imageNamed:@"yourImage.png"]; 
NSURL *myWebsite = [NSURL URLWithString:@"http://www.example.com/"]; 
NSArray *objectsToShare = @[textToShare, imageToShare ,myWebsite]; 
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil]; 
NSArray *excludeActivities = @[UIActivityTypeAirDrop,UIActivityTypePrint]; 
activityVC.excludedActivityTypes = excludeActivities; 
[self presentViewController:activityVC animated:YES completion:nil]; 
} 
UIActivityViewController
MADRID · NOV 21-22 · 2014 
CHECK CONNECTIVITY
MADRID · NOV 21-22 · 2014 
Check connectivity on Android 
ConnectivityManager 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.INTERNET" /> 
public static boolean checkConnectivity(Context context) { 
ConnectivityManager cm =(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); 
NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); 
return activeNetwork != null && activeNetwork.isConnectedOrConnecting(); 
}
MADRID · NOV 21-22 · 2014 
Check connectivity on iOS 
Reachability 
internetReach = [[Reachability reachabilityForInternetConnection] retain]; 
[internetReach startNotifier]; 
if([internetReach currentReachabilityStatus] == ReachableViaWWAN) { 
// Tenemos conexión a Internet 
} 
wifiReach = [[Reachability reachabilityForLocalWiFi] retain]; 
[wifiReach startNotifier]; 
if([wifiReach currentReachabilityStatus] == ReachableViaWiFi) { 
// Estamos conectados mediante Wi-Fi 
}
MADRID · NOV 21-22 · 2014 
APP PUBLISHING
MADRID · NOV 21-22 · 2014 
Android 
iOS 
Google requires a one time fee of US$25 
iOS Developer Program 
$99 /year 
Greater capacity for monetization 
Google play + Publish in other stores like Amazon,Opera 
AppStore 
Alpha/beta testing before put in production 
Upload to store in 30 min 
Review process 5-7 days 
Android Developer Console 
Beta Testing 
http://ibetatest.com/ 
http://testflightapp.com/
MADRID · NOV 21-22 · 2014 
Distribution
MADRID · NOV 21-22 · 2014 
Developers Library
MADRID · NOV 21-22 · 2014 
Async connections 
iOS 
Thread managed by NSURLConnection 
Android 
Services, AsyncTask 
Libraries for Android 
Otto Event Bus,RoboSpice 
http://square.github.io/otto/
MADRID · NOV 21-22 · 2014 
https://play.google.com/store/apps/details?id=com.desarrollodroide.repos 
Android libraries with demos in GP
MADRID · NOV 21-22 · 2014 
https://developer.apple.com/library/ios/navigation/ 
iOS Developer library
MADRID · NOV 21-22 · 2014 
Classes comparative 
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 
LocationManager 
for 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
MADRID · NOV 21-22 · 2014 
BOOKS
MADRID · NOV 21-22 · 2014
MADRID · NOV 21-22 · 2014 
References 
owww.developer.android.com 
ohttp://www.google.com/design/spec/material-design/ introduction.html 
ohttp://tools.android.com/ 
ohttps://android-arsenal.com/ 
ohttp://android-developers.blogspot.com.es/ 
owww.developer.apple.com 
ohttps://developer.apple.com/videos/wwdc/ 
ohttps://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/
MADRID · NOV 21-22 · 2014 
Thanks Questions?

More Related Content

Similar to From iOS to Android

GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
Mini project final presentation
Mini project final presentationMini project final presentation
Mini project final presentationGianlucaCapozzi1
 
Android training in mumbai
Android training in mumbaiAndroid training in mumbai
Android training in mumbaiCIBIL
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideVisual Engineering
 
Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.Mohammad Shaker
 
Easy2park - A smarter way to find a parking lot
Easy2park - A smarter way to find a parking lotEasy2park - A smarter way to find a parking lot
Easy2park - A smarter way to find a parking lotDaniele Davoli
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Filippo Matteo Riggio
 
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...LogeekNightUkraine
 
Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Luc Bors
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development PracticesRoy Clarkson
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
Parse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksParse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksHector Ramos
 
Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications  Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications Juliana Lucena
 
The Best Way to Become an Android Developer Expert with Android Jetpack
The Best Way to Become an Android Developer Expert  with Android JetpackThe Best Way to Become an Android Developer Expert  with Android Jetpack
The Best Way to Become an Android Developer Expert with Android JetpackAhmad Arif Faizin
 
Synapseindia android application development tutorial
Synapseindia android application development tutorialSynapseindia android application development tutorial
Synapseindia android application development tutorialSynapseindiappsdevelopment
 

Similar to From iOS to Android (20)

GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
Ruby conf2012
Ruby conf2012Ruby conf2012
Ruby conf2012
 
Android - Anatomy of android elements & layouts
Android - Anatomy of android elements & layoutsAndroid - Anatomy of android elements & layouts
Android - Anatomy of android elements & layouts
 
Mini project final presentation
Mini project final presentationMini project final presentation
Mini project final presentation
 
Android training in mumbai
Android training in mumbaiAndroid training in mumbai
Android training in mumbai
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 
Stmik bandung
Stmik bandungStmik bandung
Stmik bandung
 
Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.
 
Easy2park - A smarter way to find a parking lot
Easy2park - A smarter way to find a parking lotEasy2park - A smarter way to find a parking lot
Easy2park - A smarter way to find a parking lot
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
 
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
 
Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Android For All The Things
Android For All The ThingsAndroid For All The Things
Android For All The Things
 
Android - Api & Debugging in Android
Android - Api & Debugging in AndroidAndroid - Api & Debugging in Android
Android - Api & Debugging in Android
 
Parse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksParse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & Tricks
 
Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications  Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications
 
The Best Way to Become an Android Developer Expert with Android Jetpack
The Best Way to Become an Android Developer Expert  with Android JetpackThe Best Way to Become an Android Developer Expert  with Android Jetpack
The Best Way to Become an Android Developer Expert with Android Jetpack
 
Synapseindia android application development tutorial
Synapseindia android application development tutorialSynapseindia android application development tutorial
Synapseindia android application development tutorial
 

More from Jose Manuel Ortega Candel

Asegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdf
Asegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdfAsegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdf
Asegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdfJose Manuel Ortega Candel
 
PyGoat Analizando la seguridad en aplicaciones Django.pdf
PyGoat Analizando la seguridad en aplicaciones Django.pdfPyGoat Analizando la seguridad en aplicaciones Django.pdf
PyGoat Analizando la seguridad en aplicaciones Django.pdfJose Manuel Ortega Candel
 
Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...
Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...
Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...Jose Manuel Ortega Candel
 
Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments- All day devops Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments- All day devops Jose Manuel Ortega Candel
 
Evolution of security strategies in K8s environments.pdf
Evolution of security strategies in K8s environments.pdfEvolution of security strategies in K8s environments.pdf
Evolution of security strategies in K8s environments.pdfJose Manuel Ortega Candel
 
Implementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdfImplementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdfJose Manuel Ortega Candel
 
Seguridad en arquitecturas serverless y entornos cloud
Seguridad en arquitecturas serverless y entornos cloudSeguridad en arquitecturas serverless y entornos cloud
Seguridad en arquitecturas serverless y entornos cloudJose Manuel Ortega Candel
 
Construyendo arquitecturas zero trust sobre entornos cloud
Construyendo arquitecturas zero trust sobre entornos cloud Construyendo arquitecturas zero trust sobre entornos cloud
Construyendo arquitecturas zero trust sobre entornos cloud Jose Manuel Ortega Candel
 
Tips and tricks for data science projects with Python
Tips and tricks for data science projects with Python Tips and tricks for data science projects with Python
Tips and tricks for data science projects with Python Jose Manuel Ortega Candel
 
Sharing secret keys in Docker containers and K8s
Sharing secret keys in Docker containers and K8sSharing secret keys in Docker containers and K8s
Sharing secret keys in Docker containers and K8sJose Manuel Ortega Candel
 
Python para equipos de ciberseguridad(pycones)
Python para equipos de ciberseguridad(pycones)Python para equipos de ciberseguridad(pycones)
Python para equipos de ciberseguridad(pycones)Jose Manuel Ortega Candel
 
Shodan Tips and tricks. Automatiza y maximiza las búsquedas shodan
Shodan Tips and tricks. Automatiza y maximiza las búsquedas shodanShodan Tips and tricks. Automatiza y maximiza las búsquedas shodan
Shodan Tips and tricks. Automatiza y maximiza las búsquedas shodanJose Manuel Ortega Candel
 
ELK para analistas de seguridad y equipos Blue Team
ELK para analistas de seguridad y equipos Blue TeamELK para analistas de seguridad y equipos Blue Team
ELK para analistas de seguridad y equipos Blue TeamJose Manuel Ortega Candel
 
Monitoring and managing Containers using Open Source tools
Monitoring and managing Containers using Open Source toolsMonitoring and managing Containers using Open Source tools
Monitoring and managing Containers using Open Source toolsJose Manuel Ortega Candel
 
Python memory managment. Deeping in Garbage collector
Python memory managment. Deeping in Garbage collectorPython memory managment. Deeping in Garbage collector
Python memory managment. Deeping in Garbage collectorJose Manuel Ortega Candel
 

More from Jose Manuel Ortega Candel (20)

Asegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdf
Asegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdfAsegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdf
Asegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdf
 
PyGoat Analizando la seguridad en aplicaciones Django.pdf
PyGoat Analizando la seguridad en aplicaciones Django.pdfPyGoat Analizando la seguridad en aplicaciones Django.pdf
PyGoat Analizando la seguridad en aplicaciones Django.pdf
 
Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...
Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...
Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...
 
Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments- All day devops Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments- All day devops
 
Evolution of security strategies in K8s environments.pdf
Evolution of security strategies in K8s environments.pdfEvolution of security strategies in K8s environments.pdf
Evolution of security strategies in K8s environments.pdf
 
Implementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdfImplementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdf
 
Computación distribuida usando Python
Computación distribuida usando PythonComputación distribuida usando Python
Computación distribuida usando Python
 
Seguridad en arquitecturas serverless y entornos cloud
Seguridad en arquitecturas serverless y entornos cloudSeguridad en arquitecturas serverless y entornos cloud
Seguridad en arquitecturas serverless y entornos cloud
 
Construyendo arquitecturas zero trust sobre entornos cloud
Construyendo arquitecturas zero trust sobre entornos cloud Construyendo arquitecturas zero trust sobre entornos cloud
Construyendo arquitecturas zero trust sobre entornos cloud
 
Tips and tricks for data science projects with Python
Tips and tricks for data science projects with Python Tips and tricks for data science projects with Python
Tips and tricks for data science projects with Python
 
Sharing secret keys in Docker containers and K8s
Sharing secret keys in Docker containers and K8sSharing secret keys in Docker containers and K8s
Sharing secret keys in Docker containers and K8s
 
Implementing cert-manager in K8s
Implementing cert-manager in K8sImplementing cert-manager in K8s
Implementing cert-manager in K8s
 
Python para equipos de ciberseguridad(pycones)
Python para equipos de ciberseguridad(pycones)Python para equipos de ciberseguridad(pycones)
Python para equipos de ciberseguridad(pycones)
 
Python para equipos de ciberseguridad
Python para equipos de ciberseguridad Python para equipos de ciberseguridad
Python para equipos de ciberseguridad
 
Shodan Tips and tricks. Automatiza y maximiza las búsquedas shodan
Shodan Tips and tricks. Automatiza y maximiza las búsquedas shodanShodan Tips and tricks. Automatiza y maximiza las búsquedas shodan
Shodan Tips and tricks. Automatiza y maximiza las búsquedas shodan
 
ELK para analistas de seguridad y equipos Blue Team
ELK para analistas de seguridad y equipos Blue TeamELK para analistas de seguridad y equipos Blue Team
ELK para analistas de seguridad y equipos Blue Team
 
Monitoring and managing Containers using Open Source tools
Monitoring and managing Containers using Open Source toolsMonitoring and managing Containers using Open Source tools
Monitoring and managing Containers using Open Source tools
 
Python Memory Management 101(Europython)
Python Memory Management 101(Europython)Python Memory Management 101(Europython)
Python Memory Management 101(Europython)
 
SecDevOps containers
SecDevOps containersSecDevOps containers
SecDevOps containers
 
Python memory managment. Deeping in Garbage collector
Python memory managment. Deeping in Garbage collectorPython memory managment. Deeping in Garbage collector
Python memory managment. Deeping in Garbage collector
 

Recently uploaded

9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 

Recently uploaded (7)

9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 

From iOS to Android

  • 1. MADRID · NOV 21-22 · 2014 From iOS To Android(or reverse) José Manuel Ortega Candel @jmortegac http://www.linkedin.com/jmortega1
  • 2. MADRID · NOV 21-22 · 2014 https://speakerdeck.com/jmortega/
  • 3. MADRID · NOV 21-22 · 2014 ARCHITECTURE / iOS / ANDROID TOOLS XCODE vs ANDROID STUDIO APPLICATIONS / PERMISSIONS / PRIVACY USER INTERFACE STATIC ANALYSIS CODE / TESTING CERTIFICATES AND SIGNING EMULATORS / MEMORY MANAGEMENT/ DATABASE APP PUBLISHING / DEVELOPER LIBRARIES
  • 4. MADRID · NOV 21-22 · 2014 ARCHITECTURE
  • 5. MADRID · NOV 21-22 · 2014 Android Architecture DALVIK ART Just-In-Time (JIT) Compilation Ahead-Of-Time (AOT) Compilation Cache builds up over time Boot times are faster Cache is built at first boot Rebooting device takes significantly longer Apps compiled when executed Stores Compiled Apps Consumes much more internal storage space
  • 6. MADRID · NOV 21-22 · 2014 iOS Architecture
  • 7. MADRID · NOV 21-22 · 2014 TOOLS
  • 8. MADRID · NOV 21-22 · 2014 IDES Android iOS https://developer.android.com/sdk/ installing/studio.html APPCode http://www.jetbrains.com/objc/
  • 9. MADRID · NOV 21-22 · 2014 on Android Studio InteliJ IDE Based Maven based Build Dependency Combines Ant && Maven / Gradle Tasks
  • 10. MADRID · NOV 21-22 · 2014 Android Studio Templates
  • 11. MADRID · NOV 21-22 · 2014 Android Studio Project settings
  • 12. MADRID · NOV 21-22 · 2014 XCode Provides multiple ios app templates
  • 13. MADRID · NOV 21-22 · 2014 Xcode Project Testing on device Base SDK
  • 14. MADRID · NOV 21-22 · 2014 Interface Builder
  • 15. MADRID · NOV 21-22 · 2014 Instruments on iOS Debugging, performance analysis, and testing Real-time CPU, memory, disk, energy, and network usage Threads, network, and energy usage I/O system and thread activity Allows detecting memory leaks
  • 16. MADRID · NOV 21-22 · 2014 APPLICATIONS
  • 17. MADRID · NOV 21-22 · 2014 Android Applications
  • 18. MADRID · NOV 21-22 · 2014 Android Layout Manager+ Device Preview
  • 19. MADRID · NOV 21-22 · 2014 Android Applications import android.os.Bundle; import android.app.Activity; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);} } public static void invokeWebBrowser(Activity activity){ Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("http://www.google.com")); activity.startActivity(intent); } Activity Intents [Explicit,Implicits] Services Content Providers[Sharing data between apps] Fragments from 3.0
  • 20. MADRID · NOV 21-22 · 2014 Android components
  • 21. MADRID · NOV 21-22 · 2014 Android’s RecyclerView Adapter ViewHolder LayoutManager ItemDecoration ItemAnimator https://developer.android.com/training/material/lists-cards.html
  • 22. MADRID · NOV 21-22 · 2014 Android Navigation Drawer
  • 23. MADRID · NOV 21-22 · 2014 Layout Systems UINavigationBar UITableView TextView TextView LinearLayout TextView TextView
  • 24. MADRID · NOV 21-22 · 2014 LifeCycle Applications
  • 25. MADRID · NOV 21-22 · 2014 LifeCycle Applications - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window.rootViewController = self.navigationController; [self.window makeKeyAndVisible]; return YES; }
  • 26. MADRID · NOV 21-22 · 2014 iOS Applications C Objective –C,[message passing] Swift PlayGround for leaning Swift Programming with Objetive-C in windows/ linux http://www.gnustep.org/ https://developer.apple.com/swift
  • 27. MADRID · NOV 21-22 · 2014 Objective-C vs Swift NSString *string = @“hello”; let string = "hello" as NSString let s: NSString = "hello" var string: NSString = "hello" string= "Hello" NSLog(@“This is a string”); println("This is a string"); NSArray *myArray = [NSArray arrayWithObjects:@“string1", @“string2", nil]; var myArray = [“string1", "string2"] var myArray : [String] = [“string1", "string2"]
  • 28. MADRID · NOV 21-22 · 2014 iOS Applications @synthesize will generate getter and setter methods for your @property @interface MyObject:NSObject { NSString *_name; } @property (nonatomic,assign) NSString* name; @end @implementation MyObject @synthesize name = _ name; @end
  • 29. MADRID · NOV 21-22 · 2014 UIKit Framework UIButton UILabel UIImageView UITextField UIPickerView UIWindow UIView UIViewController NSObject,NSString,NSMutableString, NSDate,NSNumber Collections(NSArray, NSDictionary, NSSet,NSEnumerator) Foundation Framework
  • 30. MADRID · NOV 21-22 · 2014 iOS Applications UIViewController is the parent for view Controllers
  • 31. MADRID · NOV 21-22 · 2014 iOS Applications Organizer
  • 32. MADRID · NOV 21-22 · 2014 iOS Applications Snippets in XCode
  • 33. MADRID · NOV 21-22 · 2014 iOS Applications
  • 34. MADRID · NOV 21-22 · 2014 iOS Applications #import <UIKit/UIKit.h> @interface MyViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>{ IBOutlet UITableView *table; NSMutableData *dataReceive; } @property(nonatomic,assign) NSMutableData *dataReceive; @end UIViewController interface MyViewController.h implementation MyViewController.m @implementation MyViewController @synthesize dataReceive,table; - (void)viewDidLoad{ [super viewDidLoad]; NSURL *url = [[NSURL alloc] initWithString:@“url"]; self.dataReceive = [[NSMutableData data] retain]; }
  • 35. MADRID · NOV 21-22 · 2014 iOS Applications UINavigationController
  • 36. MADRID · NOV 21-22 · 2014 iOS Applications UINavigationController - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; //Recuperamos el ViewController UIViewController *rootViewController = [storyboard instantiateInitialViewController]; // Creamos un UINavigationController, que se encargará de controlar y almacenar los distintos viewControllers de nuestra aplicación. UINavigationController *navigationController = [[UINavigationController alloc]initWithRootViewController:rootViewController]; //Asignamos el navigationController como principal. self.window.rootViewController = navigationController; return YES; } -(IBAction)goToPantalla2:(id)sender { UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; //Obtenemos el controlador con Identifier "Pantalla2" Pantalla2ViewController *pantalla2Controller = [storyBoard instantiateViewControllerWithIdentifier:@"Pantalla2"]; //Lanzamos el controlador en el navigation de forma animada: [self.navigationController pushViewController:pantalla2Controller animated:YES]; }
  • 37. MADRID · NOV 21-22 · 2014 Design patterns on iOS Applications MVC Target-action Delegate and protocols A delegate is an object that control of the user interface for that event.
  • 38. MADRID · NOV 21-22 · 2014 ViewPager / UIPageViewController Swipe gesture
  • 39. MADRID · NOV 21-22 · 2014 Multilanguage NSString *localizedString = NSLocalizedString(@"Hello",@“DefaultString");
  • 40. MADRID · NOV 21-22 · 2014 Certificates and Signing Android iOS Self-signed certificate Apps are signed by developers Apple certificate Apps are signed by Apple Java Keytool Generate a distribution provisioning profile Export + Sign APK iOS Provisioning Portal Debug and distribution certificate App ID (unique ID of your app) Set of device unique identifiers Developer certificate
  • 41. MADRID · NOV 21-22 · 2014 Android Studio Export + Sign APK
  • 42. MADRID · NOV 21-22 · 2014 PERMISSIONS
  • 43. MADRID · NOV 21-22 · 2014 Permissions on Android AndroidManifest.xml Protection mechanism to interact with other applications <uses--‐permission android:name="android.permission.INTERNET"/> <uses--‐permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses--‐permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses--‐permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses--‐permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  • 44. MADRID · NOV 21-22 · 2014 Permissions on iOS oDeclare your application requirements in its manifest-like Info.plist. This is used only for ensuring device compatibility. oUIRequiredDeviceCapabilities allows you to list ’hardware-like’ capabilities that your app needs. oAppStore reads this information for filter installer devices.
  • 45. MADRID · NOV 21-22 · 2014 Permissions on iOS Privacy Analysis Tools for iOs Applications patia.unileon.es
  • 46. MADRID · NOV 21-22 · 2014 Privacy Permission Manager
  • 47. MADRID · NOV 21-22 · 2014 USER INTERFACE
  • 48. MADRID · NOV 21-22 · 2014 Evolution
  • 49. MADRID · NOV 21-22 · 2014 Android Material design Minimalist and consistency Transitions, animiations Cards https://developer.android.com/training/material/get-started.html
  • 50. MADRID · NOV 21-22 · 2014 Android Material design Ldrawer https://github.com/kanytu/android-material-drawer-template https://github.com/IkiMuhendis/LDrawer <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="android:Theme.Material.Light"> <item name="android:colorPrimary"> @color/primary</item> <item name="android:colorPrimaryDark"> @color/primary_dark</item> <item name="android:colorAccent"> @color/accent</item> <item name="android:textColorPrimary"> @color/text_primary</item> <item name="android:textColor"> @color/text_secondary</item> <item name="android:navigationBarColor"> @color/primary_dark</item> </style> </resources>
  • 51. MADRID · NOV 21-22 · 2014 Android Material design https://github.com/google/iosched
  • 52. MADRID · NOV 21-22 · 2014 Android Fragments Fragment is a chunk of user interface with its own life cycle. Fragment must exist within an Activity Interaction with fragments is done through FragmentManager Fragment API was introduced in API 11 http://developer.android.com/tools/support-library
  • 53. MADRID · NOV 21-22 · 2014 Android Fragments
  • 54. MADRID · NOV 21-22 · 2014 iOS Master-Detail template UISplitViewController
  • 55. MADRID · NOV 21-22 · 2014 Notifications
  • 56. MADRID · NOV 21-22 · 2014 STATIC ANALYSIS CODE
  • 57. MADRID · NOV 21-22 · 2014 Static analysis code on Android Studio Inspect Profile Lint
  • 58. MADRID · NOV 21-22 · 2014 Static analysis code on Java projects SonarQube Sonnar-runner
  • 59. MADRID · NOV 21-22 · 2014 Static analysis code on XCode Static Analyzer Detect memory leaks
  • 60. MADRID · NOV 21-22 · 2014 TESTING
  • 61. MADRID · NOV 21-22 · 2014 Mobile Application Testing TYPES Unit Testing Functionality Testing Integration Testing Regression Load Testing Stress Testing Performance Usability Testing
  • 62. MADRID · NOV 21-22 · 2014 Mobile Application Testing
  • 63. MADRID · NOV 21-22 · 2014 CheckList Rotating the screen Behavior of when network is not available Navigation between screens Behavior of app if app is running for longer period of time and checking memory
  • 64. MADRID · NOV 21-22 · 2014 Testing on Android Unit & Integration,TDD  Junit RoboElectric Acceptance,BDD RobotiumTesting User Interface Calabash
  • 65. MADRID · NOV 21-22 · 2014 Unit testing on iOS XCTest #import <XCTest/XCTest.h> #import “TestObject.h" @interface TestOjectLogicTests : XCTestCase { @private TestObject *object; } @end
  • 66. MADRID · NOV 21-22 · 2014 EMULATORS
  • 67. MADRID · NOV 21-22 · 2014 Emulator vs Simulator Android iOS Emulator Simulator Very slow integrated with SDK Integrated with Xcode Emulates hardware and software Simulates only software Launched apps are equal binaries from the apps compiled for Device CPU Launched apps are different binaries from the apps compiled for Device CPU
  • 68. MADRID · NOV 21-22 · 2014 Genymotion Integration with Eclipse and Android Studio MULTI OS Compatible with Linux,Windows and Mac Requires VirtualBox
  • 69. MADRID · NOV 21-22 · 2014 Alternatives http://jimulabs.com/ for Android live preview https://appthwack.com/ for testing in the cloud with real devices
  • 70. MADRID · NOV 21-22 · 2014 MEMORY MANAGEMENT
  • 71. MADRID · NOV 21-22 · 2014 Android Handles memory management automatically Garbage Collector iOS release, retain, autorelease ARC(Automatic Reference Counting) Developer maintain the count number for each object Destroys object when reference counting become 0 @autoreleasepool With ARC, compiler set this methods where its necessary
  • 72. MADRID · NOV 21-22 · 2014 ARC Migrating to ARC Project Build Settings
  • 73. MADRID · NOV 21-22 · 2014 DATA PERSISTENCE
  • 74. MADRID · NOV 21-22 · 2014 Android iOS SQLite android.database.sqlite Tables and relations Core Data Objects DataModel Content Providers /data/data/<Application-Package> /databases/<database-name> Only acces with root DataModel editor in Xcode for register objects and their relationships
  • 75. MADRID · NOV 21-22 · 2014 iOS Core Data
  • 76. MADRID · NOV 21-22 · 2014 Alernatives http://realm.io/ Android and iOS Object-oriented API C++ Core
  • 77. MADRID · NOV 21-22 · 2014 SHARED ACTIONS
  • 78. MADRID · NOV 21-22 · 2014 Android <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/share" android:title="@string/share" android:showAsAction="ifRoom" android:actionProviderClass="android.widget.ShareActionProvider"/> </menu> private ShareActionProvider mShareActionProvider; mShareActionProvider.setShareIntent(getDefaultShareIntent()); private Intent getDefaultShareIntent(){ Intent intent = new Intent(Intent.ACTION_SEND); //IMPLICIT INTENT intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT,"Extra Text"); return intent;}
  • 79. MADRID · NOV 21-22 · 2014 iOS - (IBAction)shareButton:(UIBarButtonItem *)sender { NSString *textToShare = @“textToShare"; UIImage *imageToShare = [UIImage imageNamed:@"yourImage.png"]; NSURL *myWebsite = [NSURL URLWithString:@"http://www.example.com/"]; NSArray *objectsToShare = @[textToShare, imageToShare ,myWebsite]; UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil]; NSArray *excludeActivities = @[UIActivityTypeAirDrop,UIActivityTypePrint]; activityVC.excludedActivityTypes = excludeActivities; [self presentViewController:activityVC animated:YES completion:nil]; } UIActivityViewController
  • 80. MADRID · NOV 21-22 · 2014 CHECK CONNECTIVITY
  • 81. MADRID · NOV 21-22 · 2014 Check connectivity on Android ConnectivityManager <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> public static boolean checkConnectivity(Context context) { ConnectivityManager cm =(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); return activeNetwork != null && activeNetwork.isConnectedOrConnecting(); }
  • 82. MADRID · NOV 21-22 · 2014 Check connectivity on iOS Reachability internetReach = [[Reachability reachabilityForInternetConnection] retain]; [internetReach startNotifier]; if([internetReach currentReachabilityStatus] == ReachableViaWWAN) { // Tenemos conexión a Internet } wifiReach = [[Reachability reachabilityForLocalWiFi] retain]; [wifiReach startNotifier]; if([wifiReach currentReachabilityStatus] == ReachableViaWiFi) { // Estamos conectados mediante Wi-Fi }
  • 83. MADRID · NOV 21-22 · 2014 APP PUBLISHING
  • 84. MADRID · NOV 21-22 · 2014 Android iOS Google requires a one time fee of US$25 iOS Developer Program $99 /year Greater capacity for monetization Google play + Publish in other stores like Amazon,Opera AppStore Alpha/beta testing before put in production Upload to store in 30 min Review process 5-7 days Android Developer Console Beta Testing http://ibetatest.com/ http://testflightapp.com/
  • 85. MADRID · NOV 21-22 · 2014 Distribution
  • 86. MADRID · NOV 21-22 · 2014 Developers Library
  • 87. MADRID · NOV 21-22 · 2014 Async connections iOS Thread managed by NSURLConnection Android Services, AsyncTask Libraries for Android Otto Event Bus,RoboSpice http://square.github.io/otto/
  • 88. MADRID · NOV 21-22 · 2014 https://play.google.com/store/apps/details?id=com.desarrollodroide.repos Android libraries with demos in GP
  • 89. MADRID · NOV 21-22 · 2014 https://developer.apple.com/library/ios/navigation/ iOS Developer library
  • 90. MADRID · NOV 21-22 · 2014 Classes comparative 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 LocationManager for 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
  • 91. MADRID · NOV 21-22 · 2014 BOOKS
  • 92. MADRID · NOV 21-22 · 2014
  • 93. MADRID · NOV 21-22 · 2014 References owww.developer.android.com ohttp://www.google.com/design/spec/material-design/ introduction.html ohttp://tools.android.com/ ohttps://android-arsenal.com/ ohttp://android-developers.blogspot.com.es/ owww.developer.apple.com ohttps://developer.apple.com/videos/wwdc/ ohttps://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/
  • 94. MADRID · NOV 21-22 · 2014 Thanks Questions?