In this video it shows the code to hide the soft input method (key-board defined in Android OS) when any of the input widget, such as Edit Text (Plain Text) is clicked in the Android App. I hope you like this video. For any questions, suggestions or appreciation please contact…
Tag: smartphone
How to create Excel file from ListView data and save it in Download directory from your Android app?
This video shows the steps to create an excel file from the ListView data. In this demo it first creates the ListView with some sample string data. Then in the button onClick method, it reads the listView data one by one iteratively and populate the respective cells of an excel…
How to download an image file from AWS S3 using signed URL in your Android App?
In this video it shows the steps for downloading an image file from AWS (Amazon Web Services) S3 (Amazon Simple Storage Service) in your Android App. It uses the signed URL of the file which is valid for a limited period (max 12 hours). In this demo the signed URL…
How to fix android.os.NetworkOnMainThreadException by defining StrictMode.ThreadPolicy in your Android Studio code?
This video shows the steps to quickly fix android.os.NetworkOnMainThreadException in your Android Studio Java code. The fix shown is more of a workaround. Ideal fix would be to run all the network related tasks in a separate thread using async methods. However, in this video it shows how one can…
How to auto fit (auto scale or Zoom) an image in webView of your Android App? – Android Studio code
This video shows the steps to auto fit/ auto scale an image file in the WebView widget of your Android App. It uses below attributes in the settings of the WebView object to enable the auto-scaling:webView.getSettings().setLoadWithOverviewMode(true);webView.getSettings().setUseWideViewPort(true); For testing purpose, it uses below image from the testing page of programmer world…
Difference between List vs Set in Java code of your Android App?
As shown in this video, the main difference are: Set: List: I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com Complete source code and other details: With Duplicate entry of “Tokyo” Without any duplicate entry:
How to rotate the picture in ImageView of your Android app?
This video shows the steps to rotate the pictures in the image view of your Android App. It uses the SetRotation property of the ImageView to rotate the image. I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com…
How to create scratch cards (without using 3rd party libraries/ dependencies) in your Android App?
In this video it shows the steps to create your own scratch card in your Android App. It does not uses any external libraries or dependencies and does it by simply using the PorterDuffXfermode in the Canvas which is set in imageView widget. I hope you like this video. For…
How to restrict Dual App functionality for your Android App? – Android Studio code
This video shows the code to restrict the dual app functionality for your Android App. It seems that dual apps is an OS level functionality and most of the phone OEMs provide this functionality. There seems to be no direct API to restrict it. However, it can be done from…
How to RequestLocationUpdates if LocationServices.getFusedLocationProviderClient.getLastLocation always return null value in your Android App?
This video shows the steps to implement request location updates APIs for enforcing the App and Android device to get the updated location information. This is particularly useful when the App is trying to access the last location from the getFusedLocationProviderClient library. If the getLastLocation API is returning NULL then…