Let's look at a template you can use in creating any type of project that requires Kotlin PHP MySQL CRUD multipart as well as authentication, with advanced features like Disk caching, Pagination and Data Binding. You can use it in any project but for us we use the concept of a
Famous Paintings
app. An app that admins can post paintings, update them and delete them for other people to view. It's a full android app covering major concepts. You can use it to learn full app android development as well.
What You will Learn
As a template and learning project, this app has been designed to mainly teach you the following concepts:
- Full App Android Development using Kotlin, PHP and MySQL.
- How to use Fast Networking Library to interact with RESTFul services.
- How to perform CRUD operations involving both images and text agains PHP MySQL server. Learn how to efficiently upload images alongside text, while showing upload progress. Also how to update, delete and download.
- How to write a full android app using Model View ViewModel and see it's benefits with regards to seperation of concerns.
- How to create a highly fast and bandwith friendly android app making use of permanent Disk caching and that avoids unnecessary calls to the server. We rarely make calls to the server. We paginate our data. When we make a call, we send only single requests that do only a single thing in the server, ensuring fast response times from the server.
- How to make an app that is scalable and that can be hosted even in the cheapest of webhosts yet easily server hundreds of thousands of users. We do this by ensuring that the app is offline-first, downlaods data in chunks and doesn't make a request to the server unless a user performs an action that requires we connect. This is mostly leaves our server untouched for other users to use. The data including the details of lists are cached permanently on disk, and gets auto-refreshed if we make a change or hit the refersh button.
- Learn to make an android mysql app that has authentication. Where admins can login into the app and do stuff and even view their account details. Other users on the other hand can only view data but not make an edit.
- Learn how to make an android app that has several pages like Splash screen, Dashboard page, Upload page, listings page, details page, login page as well as Accounts Page. Yet we abstract away the similarities in Base Activities, and take advantage of inheritance to pass over those properties to the child activities.
- Learn to create an app with several material widgets like material edittexts, material dialogs, material datepicker, collapsing toolbar layouts etc.
- Learn to create an animated app, with beautiful transition animations between pages. The pages slide beautifully in and out of view.
- Learn how to create an app that can interact with both secure https and non-secure http content (ClearText traffic).
- And many more.
Major Technologies
Here are technologies you will learn from the project:
- Kotlin Programing Language.
- Object Oriented PHP 7.2
- MySQL
- RedbeanPHP ORM
- Model View ViewModel
- Data Binding
- Fast Networking Library
- Gson
Read technical details about this project
HERE.
You are welcome.
You are welcome.
Please download the source code, I have fixed the link.
Hi F V, am sorry for the late response. There is no need to manually create a database. The PHP code will auto-create a database for you if you attempt to insert data. Just update the database credentials like username and password. Then the php code will create a table for you based on the data types of the incoming data.
You are welcome.
Hi Mathew, sorry for late response. I really haven’t used MVC in android but I would guess that it probably doesn’t fit android platform that well. I would claim that it is inferior since ViewModel provides us with an easier way to handle android lifecycle.
Thanks.
It actually should have been instant. It was an issue on our side. We have fixed it. You are now a Silver Member. Thanks very much.
Hi Mathew, thanks for coming back. I have emailed you.
Thanks.
Hi Penguim, this app is very extendable.Yeah notifications can be added.
I have replied via email.
You are welcome.
Hi Mathew, no they aren’t the same thing. For example we have included code in the PermissionManager class that can allow an admin to delete news but prevent an editor from doing the same thing:
fun canDeleteNews(): Boolean {
return if (!isLoggedIn) false else CURRENT_USER === Constants.ADMIN_EMAIL
}
All you then have to do is to check the capability before a delete button is clicked e.g:
if(PermissionManager.canDeleteNews()){
receivedNews?.let { delete(it) }
}
It is not difficult to assign a user readonly permissions. For example below code checks that a user is logged in, but is neither an admin nor an editor. Meaning that this user can only read but doesn’t qualify for editing/deleting permissions:
fun canOnlyRead(): Boolean {
return if (!isLoggedIn) false else CURRENT_USER != Constants.ADMIN_EMAIL
|| CURRENT_USER != Constants.EDITOR_1_EMAIL
}
Thanks Mathew for leaving your feedback. I will send you a bonus project as part of my appreciation.
Given that it works on localhost it may be a server side issue like inability to connect to mysql or that you have specified a wrong url in your code.
Hi Mathew, sorry there was a small maintenance issue but it’s now fixed. Can you try again. If you don’t succeed just inform me here: oclemmi@gmail.com I can email you the project.
You are welcome.
Hi Casiean, thanks for your purchase. By the way am sending you an updated one right this moment. I noticed some small bugs and I have fixed them let me send you the update via email.
Exactly, am sorry for the term. I actually meant searching at the database level using SQL statements instead of fetching all data into a collection then applying a search. Thanks for stopping by.
You are welcome.
Hi Vitalie, congrats for finsishing the course. Have you tried Udemy because am experiencing alittle issues with my server and website right now. And by the way am currently preparing an MVVM version of the app and then one for uploading images also MVVM so stay tuned. Please download the files from Udemy.
Thank you very much.
Great request, I’ll do this probably with JSON and MySQL.