Download our free news app and get instant news from popular news channels instantly. Get the app from here… https://play.google.com/store/apps/details?id=app.mobile.daily_news Please download and leave your valuable feedback as well. Why you will download this app? Fast and efficient. Incorporates news from all famous news channels. Consumes minimal battery. No intruding notifications. Completely free. Daily News for you..… Read More »
RoundRectCornerImageView Usage in XML
In this article, Lets find out how the image loading libraries like Picasso, Glide and Fresco works. We know that images are the one which takes most of the space in our application either in App size or the memory at runtime. Also using large number of images often kicks off Garbage Collection (GC) Events. The more number… Read More »
Here is a simple example where the user clicks a button to show a Snackbar. We know that there is no inbuilt snackbar for iOS. But Flutter makes it easy to do without any custom native code. You can see a Demo video here. Here we use two main elements Scaffold Snackbar The Scaffold Widget from the material… Read More »
Typically when an device is connected to WiFi, it will be assigned an IP. Here we will see how we can extract the IP of an iOS device. Below is the sample code for that
Here is a simple function to reverse a byte array in android.
Apple has introduced a new API in iOS 11 where you can directly connect to a Wi-Fi from with-in the app. For this code to work 1. you need to enable the networking capabilities in your provisioning profile. 2. Once you enable the networking profile in the provisioning profile, you need to regenerate and sign the app with… Read More »
Google has now come up with a new compiler for Android, the D8. This one is basically improved and efficient compared to the DX compiler. Google had shipped the D8 compiler along with Android Studio 3.0 with a opt-in feature. In the initial phase the default compiler would be DX, then Google will deprecate it in later phase.… Read More »
Basically saying both are same. But there are some differences. Lets see what are some of the advantages of Promises. Promises are just a cleaner way for running asynchronous callbacks. Promises also has error catching mechanism which are not in callbacks. Promises are an abstraction for cleaner and better functional code. What are callbacks? Callback is a function… Read More »
The document demonstrates the steps to create react native module bridge in Android and iOS. Below are the steps for creating a native bridge in Android. ANDROID Open the Android Studio with the corresponding project from your react native project. Step 1 : Create the Java class that extends ReactPackage. (eg: AndroidModulePackage.java). Implement the interface methods (createViewManagers &… Read More »
Lets talk about the Room Persistent Library from Google. The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite. The library helps you create a cache of your app’s data on a device that’s running your app. This cache, which serves as your app’s single source… Read More »
Permissions Add these two permissions in the Android Manifest Read SMS from Inbox Reading SMS from inbox is not a big task, but your user needs to allow it if you app is running on Marhmallow or more. if you app is below marshmallow, then you wont need it. But here we will write one code for both… Read More »
What is ButterKnife? Its a kind of view injection in Activities or Fragments using Annotations. Butterknife can be used to 1. Bind Views 2. Bind Clicks 3. Can be used with resources like strings, colors, Dimens, Drawables etc. Below are the annotations available AnnotationDescription @BindView Binds view object. TextView, Button, Spinner or any view object @BindView(R.id.logo) ImageView imgLogo;… Read More »
The click on a button or View is usually called when the user clicks on it. But how can we call it programatically. Here is a simple example yes “performClick()”, this is how to call click programatically.
Here is a simple way to check if your app in running in Foreground or Background
Here are some git commands that you will normally use in a git version controlled project repository. Commit For Commiting all modified files use git commit -am”Message” Status For checking the status of the git repository use git status Log For getting the information about the Git checkins use… git log To Print in a convenient one line… Read More »
StringBuffer StringBuffer is mutable means one can change the value of the object . The object created through StringBuffer is stored in the heap. StringBuffer has the same methods as the StringBuilder , but each method in StringBuffer is synchronized that is StringBuffer is thread safe.Due to this it does not allow two threads to simultaneously access the… Read More »
Using Otto Event Bus to Communicate b/w Activity and Fragment. Otto Event Bus is an Android Library that helps developers to communicate between Android Activity and Fragment and vice-versa. Lets see a simple implementation of this. Here I will pass a simple string from Activity to Fragment and Vice-versa. Gradle Layout Activity layout Fragment Layout Register and unregister… Read More »
Here is a simple example in which we will download a font from google and set it to our textview. View the Demo here Layout Here is our layout. The Edittext is a autocomplete textview where we will load the font names to download. The font names are stored in values.xml Lets see the layout. Font Family names… Read More »
Android’s Backup service allows you to persist the data in a Google cloud storage. Android does this with the help of a BackUpAgent in the SDK. If we want to backup the data, then extend the BackupAgent. Lets see how we can do this. Benefits Reduce user frustration Increase login-rate. Reduce support calls Minimize user attrition Sustain user… Read More »
For API above 19 For API from 11 to 18 For API below 11 Check this post to show the image selected from gallery in an imageview.
Special characters can be included in string literals using the following escape sequences: The following example shows how to use a few string literals: Swift 4 Escape sequence Meaning \0 Null Character \\ \character \b Backspace \f Form feed \n Newline \r Carriage return \t Horizontal tab \v Vertical tab \’ Single Quote \” Double Quote \000 Octal… Read More »