Only Portrait Mode (ScreenOrientation

Hey,
This is the code segment which makes your Android application just works on Portrait Mode which means you cannot let the application using on landscape mode.

<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="orientation"
android:screenOrientation="portrait"
>
You should put the configChanges and screenOrientation method for your every activities.

What is what?

configChanges : Android understands that you will be responsible of the changes of orientation.

screenOrientation : Setting the default orientation mode, you set the which mode you want.

How to extract filename from Uri?

Now, we can extract filename with and without extension :) You will convert your bitmap to uri and get the real path of your file. Now w...