- In this application, the user is able to see ads from all the members
- The user can add new ads to the platform, setting all his information as value, region, category, description, title and phone for contact
- Filter the ads by region and category to find closer contacts
This application was written in Kotlin language using Android Studio. It uses Google Firebase as database, saving ads and it's information and user information in there.
Android Studio
Firebase
Kotlin
OLX
- Registration and Login using email and password authenticated by Google Firebase!
- Create your personalised ad and set all the information you need for your sell!
- Choose photos from your internal gallery to improve your ad!
- Set up your phone number to receive direct calls and finish your sell!
- Filter the ads by region and category to make your search easier!
- Click in which ad you want to check for more information!
- Call directly the registered number in the ad to make the communication easier!
private fun recoverAdsByRegion(){
configDialog()
adRef = FirebaseDatabase.getInstance()
.getReference("ads")
.child(filterRegion)
adRef.addValueEventListener(object: ValueEventListener{
override fun onDataChange(snapshot: DataSnapshot) {
adList.clear()
for (category: DataSnapshot in snapshot.children){
for (ads: DataSnapshot in category.children){
val ad: Ad = ads.getValue(Ad::class.java)!!
adList.add(ad)
}
}
adList.reverse()
adapterAd.notifyDataSetChanged()
dialog.dismiss()
binding.buttonRegion.text = filterRegion
}
override fun onCancelled(error: DatabaseError) {
dialog.dismiss()
}
})
}
Example of the code needed to recover the ads from the Google Firebase to create the exhibition in the RecyclerView, filtering all the registered information by the selected region