iOS Developers need a wide variety of skills and knowledge to perform their jobs well. These skills and knowledge have wide applications beyond iOS, especially when sticking within the realms of Mobile Application Development.
This deck of slides shows some common cases where an iOS Developer can with minimal effort use their existing skills to build Android apps.
Presented at iOSDevUK 2015.
22. public class MainActivity extends Activity {
final int CAMERA_REQUEST_CODE = 0;
Button showCameraButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
showCameraButton = (Button) findViewById(R.id.show_camera_button);
showCameraButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showCamera();
}
});
}
public void showCamera() {
if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
requestPermissions(new String[]{Manifest.permission.CAMERA}, CAMERA_REQUEST_CODE);
} else {
// ... Show camera
}
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if (requestCode == CAMERA_REQUEST_CODE && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// ... Show Camera
}
}
}
23. - Android is a mess of disparate OEMs and legacy versions
- Fragmentation is a headache for developers
- Fragmentation presents a lot of problems for enterprise…
there aren’t many good solutions
The Internet Said…
Quotes from The Next Web, Open Signal & Tech Target
27. Screen Sizes (iOS)
- Autolayout
- Setup constraints on views to
accommodate multiple screen sizes
- Use Size Classes for fine grained
constraint control
28. Screen Sizes (Android)
- Views & layouts can be designed to be
pixel independent
- Android resizes layouts based on device
screen
- Can design multiple variants of the same
layout for specific device dimensions
29.
30.
31. OS Fragmentation (iOS)
- Encourage users to update for new
features
- Encourage developers to support new
features unavailable on older iOS versions
- Runtime detection of OS version in code
using Availability attributes
32. OS Fragmentation (Android)
- Android Support Libraries
- Provides features that are backwards
compatible to devices running old versions
of Android
- Ability to support devices running Android
1.6 (Donut)