A Simple Android Media Picker Libary Made in Java with Multiple Features.
- 1.0 Basic Intialzation of the project
- 2.0 Pick Media & Preview Media only applied in Activity
- 2.1 Pick Media & Preview Media Feature Working in Fragments also. (Implemented Listeners also)
-
Make Newly Created Videos And Photos On The Go.
-
Takes The Context Into The Part And Returns The Uri Of The Image From The Picker Or The Camera And Also, Takes Video From The Camera.
-
Take Media Preview Including Video And Photos Before Finally Picking Them
-
Works And Tested On Android 12 & Android 10
Screenshots of the Libary
Gallery Screen | Video Screen | Image Preview Screen | Video Preview Screen |
![]() |
![]() |
![]() |
![]() |
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://jitpack.io" }
}
}
implementation 'com.github.RedEyesNCode:PickMe:2.1'
- If you want to use this libary in the fragment >>
- Implement the RedEyesNCodeListener into the Fragment. Which contains 3 method
RedEyesNCodeListener >> void onImageReceive(Uri uri); void onVideoReceive(Uri uri); void onBitmapReceive(Bitmap bitmap);
- Use the
redEyesNCode.initFragment(getActivity(),this);
Method if you want to notify the listener
- If you want to use this libary in the activity >>
- You need to add these check in the onActivityResultOf the Activity from which you are calling.
mediaType can be of Three Types which are :: BITMAP, VIDEO, IMAGE
String mediaType = data.getStringExtra("MEDIA_TYPE");
Note :: Just See the MainActivity.java code you will get it all Trust Me ! :)