tishik int. university / college of science / it dept....5. understanding the context in android...

22
For 4 th Grade Students This Course based mainly on online sources Tishik Int. University / College of Science / IT Dept. Presented By: Mohammad Salim Al-Othman ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 1

Upload: others

Post on 27-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

For 4th Grade Students

This Course based mainly on online sources

Tishik Int. University / College of Science / IT Dept.Presented By: Mohammad Salim Al-Othman

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 1

Page 2: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

Helpful Resources

Textbook:

• Professional Android 2018, Book by Ian Lake and Reto Meier

Websites:

• https://developer.android.com/

• https://developer.android.com/guide/

• https://www.tutorialspoint.com/android/

• https://developer.android.com/courses/fundamentals-training/overview-v2

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 2

Page 3: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

Learning Outcomes:

1- Students learn building Multi-Screen Apps.

2- Students learn polishing Apps.

3- Students will know how to connect their Apps to Internet to receive data.

4- Students will learn about creating SQLite database for Android Apps.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 3

Page 4: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

Syllabus

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 4

Page 5: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

Grading Scheme:

Type Quantity Grade

Quiz 2 5HW 1 5

Project 1 15Midterm 1 20Lab Exam 1 10

Final Exam 1 40

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 5

Page 6: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

INTRODUCTIONA Roadmap to Application Development

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 6

Page 7: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

INTRODUCTION – Cont.A Roadmap to Application Development

Special Consideration — for Game Developers

Reference: https://hackernoon.com/a-roadmap-to-application-development-bfa2e32fcd82ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 7

Page 8: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer

1. Understand the Activity Lifecycle as having the knowledge of the activity lifecycle is very important when it comes to building a bug-free application.

2. Understand the Fragment and its lifecycle. It is primarily to support more dynamic and flexible UI designs on large screens, such as tablets.

3. Learn how to debug your Android application as it is the single most important skill for any developer. Android Studio provides a debugger that allows you to do so many important things.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 8

Page 9: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer

4. Know about the navigations, task and back stack. Android Activities are the logical construct of the screens that we want a user to navigate through. The relation that each Activity holds with respect to other is very crucial for a good user experience.

5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context is almost everywhere in Android Development and it is the most important thing in the Android Development, so we must understand to use it correctly.

6. Learn about the threading in detail. As the Java Virtual Machine allows an application to have multiple threads of execution running concurrently. We must know how to take the advantage of multi-threading environment correctly.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 9

Page 10: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer7. Learn how to handle the configuration changes. Some device

configurations can change during the runtime such as screen orientation, keyboard availability, and when the user enables multi-window mode. We must know how to handle these changes.

8. Know about database and SQL.9. Know about the REST & HTTP.10. Learn about the content providers. They are used to share data between

the applications. They provide mechanisms for defining data security and for encapsulating the data.

11. Know about the 3rd party libraries. We have Mindorks Android Store to browse through all the important Android libraries, projects, tools, and apps. Compare them with their GitHub stars.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 10

Page 11: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer

12. Understanding Android Core. Looper, Handler, and HandlerThread are the Android’s way of solving the problems of asynchronous programming. They are not old school, but a neat structure on which a complex android framework is built.

13. Learn about Service and IntentService. A service is a component that is used to perform operations on the background such as playing music, handle network transactions, interacting content providers etc. It doesn't have any UI (user interface).

14. Explore when you should consider using ArrayMap for better performance of the Android application.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 11

Page 12: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer

15. Learn about the tools to get the metrics of the memory usage, CPU usage, and etc. There are a few metrics that you should measure continuously while android application development.

16. Learn about the caching implementations.

17. Learn about the optimizing network request frequencies.

18. Learn about the Android Sensors, GPS, Acceleration.

19. Learn about location and maps.

20. Learn about creating Custom View. To develop a better Android app, we must know how to create the custom views.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 12

Page 13: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer21. Always focus more on learning techniques not so many frameworks. This

helps in the longer run. As an example, I wrote on: How The Android Image Loading Library Glide and Fresco Works?

22. Holding reference of objects that are not required anymore is a bad practice, freeing objects reference after being served is helpful for the garbage collector to kill that object, that eventually helps yourself in memory leaks issues. If you keep objects reference unnecessarily, it only leads to memory leaks. Learn how to detect and fix the memory leaks in the Android application.

23. Learn about the performance patterns in Android applications. How to improve the performance of your application.

24. Learn about the battery improvement.25. Understand the app launch time and work on to improve it.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 13

Page 14: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer26. Know how you can reduce the APK size.27. Understand Bitmaps. As it takes a huge amount of memory, can lead to

OOM easily. Users love content! Especially when the content is well formatted and looks nice. Images, for instance, are extremely nice content, mainly due to their property of conveying a thousand words per image. They also consume a lot of memory. A lot of memory!

28. Learn RxJava. Nowadays RxJava is a must for developing an Android app.29. Learn about the dependency injection, Dagger.30. Learn about MVP architecture.31. Learn how to apply proguard in an Android application. It is a tool used to

minify the code, obfuscate the code, and optimize the code which reduces the size of the application.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 14

Page 15: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer

32. Read about the security tips to build a secure Android application.

33. Know about the Android Useful tools. As we all are fortunate to live in the world where everyone builds tool to help each other. These tools make the development fast and our life easier. Do not forget to explore and use these tools.

34. Read others code. This is the best thing a developer can do and learn to code in the best way. I personally feel that I have learned a lot from the code of the open-source apps.

35. Know about the Android development best practices.

36. Learn Git. It is a version control system for tracking changes in computer files and coordinating work on those files among multiple people.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 15

Page 16: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

A Roadmap To Become A Better Android Developer

Improving yourself as an Android Developer

37. Know how to improve your code with lint checks

38. Know about the Gradle Build Tool.

39. Contribute to open source projects. I love open source. It has really helped me a lot to improve myself. So, start contributing to open source.

40. Become more productive in android with android studio plugins.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 16

Happy Learning :)Reference: https://medium.com/mindorks/a-roadmap-to-become-a-better-android-developer-3038cf7f8c8d

Page 17: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

List View and Array Adapter

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 17

Page 18: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

List View and Array Adapter

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 18

Page 19: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

Github code for NumbersActivity.java file:

public class NumbersActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_numbers);

// Create a list of words ArrayList<String> words = new ArrayList<String>(); words.add("one"); words.add("two"); words.add("three"); words.add("four"); words.add("five"); words.add("six"); words.add("seven"); words.add("eight"); words.add("nine"); words.add("ten");

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 19

Page 20: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

Github code for NumbersActivity.java file –Cont.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 20

Page 21: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

List View

• Without the adapter the ListView is just an empty container.

• This ListView is powered by ArrayAdapter that holds onto the set of data shown on the screen.

• So the ArrayAdapter adapt data into a list item view that will be displayed in the ListView.

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 21

Page 22: Tishik Int. University / College of Science / IT Dept....5. Understanding the Context In Android Application. To develop a better Android app, we must know what context is? Context

Edmodo : IT 405/A Advanced Mobile App

Class Code: 9db8mx

ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring 22