How to make SoundPool in Android

Full source code how to use the SoundPool class to play short, repetitive sound clips. Since API level 21 (Android Lollipop), the old SoundPool constructor is deprecated, so we will also learn, how to use the new SoundPool.Builder class. We will define a streamType for the old constructor and a usage and contentType for the … Read more

Firebase Storage to Upload and Retrieve Images in Android

Full project with source code in Android how to upload images from our device to Firebase and then retrieve and display these images in a RecyclerView. For this we will use the Firebase storage and database as well as the Picasso library Dependencies: com.android.support:recyclerview-v7:28.0.0 com.android.support:support-compat:28.0.0 com.squareup.picasso:picasso:2.71828 activity_images.xml activity_main.xml AndroidManifest.xml image_item.xml ImageAdapter.java ImagesActivity.java MainActivity.java Upload.java

Android to make OnClickListener for Multiple Buttons

activity_main.xml Full project with source code how to set OnClickListeners for multiple buttons and handle them all in one onClick method. Instead of passing an anonymous inner class to the setOnClickListener method, we will pass the activity itself and implement the OnClickListener interface into our MainActivity. We will then use a switch/case statement to check … Read more

Full project to make Slide Animation Between Activites in Android

Full source code how we can add a sliding transition between activities. We will first apply them to specific activities only by using the overridePendingTransition method after starting an intent and also after calling the finish method. Then we will learn how to apply them globally to our whole app by creating a seperate theme … Read more