<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Code Gradients on Medium]]></title>
        <description><![CDATA[Stories by Code Gradients on Medium]]></description>
        <link>https://medium.com/@codegradients?source=rss-99325e78bd96------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BzxRLQwDQVxO4C-agrSkdg.png</url>
            <title>Stories by Code Gradients on Medium</title>
            <link>https://medium.com/@codegradients?source=rss-99325e78bd96------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 17 May 2026 01:33:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@codegradients/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Home Screen Widgets in Android — Java]]></title>
            <link>https://medium.com/@codegradients/home-screen-widgets-in-android-java-7a6ee5b0157b?source=rss-99325e78bd96------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a6ee5b0157b</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[android-widget]]></category>
            <category><![CDATA[widget]]></category>
            <dc:creator><![CDATA[Code Gradients]]></dc:creator>
            <pubDate>Fri, 31 Jan 2020 11:05:36 GMT</pubDate>
            <atom:updated>2020-01-31T11:05:36.485Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Home Screen Widgets in Android — Java</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*qKXKeajkJl4PTwve-i8O0A.jpeg" /></figure><p><strong>Introduction</strong></p><p>Home screen widgets are broadcast receivers that provide interactive components. They are primarily used on the Android home screen. They typically display some kind of data and allow the user to perform actions with them. For example, a widget can display a short summary of new emails and if the user selects an email, it could start the email application with the selected email.</p><p>Views are also called widgets in android so we’ll use the term “Home Screen Widgets”</p><p>Home Screen Widgets doesn’t use original Views object but they uses a special type of view called Remote Views.</p><p>Remote views have less functionality than the original Java Views.</p><p>Remote Views can support these types of views. i.e. AnalogClock, Button, Chronometer, ImageButton, ImageView, ProgressBar and TextView.</p><p>As of Android 3.0 more views are available: GridView, ListView, StackView, ViewFlipper, and AdapterViewFlipper. These adapter views require that you define a collection view widget.</p><p>Layout for Home Screen Widget is provided by a broadcast receiver, which will inflate a view into Remote Views type.</p><p><strong>Implementation</strong></p><p><strong>1: Create</strong> a new project in Android Studio by navigating to</p><p>File-&gt;New-&gt;Project</p><p><strong>2: Create</strong> a layout for your home screen widget named <em>app_widget_layout</em> by navigating to res-&gt;layout-&gt;New and place the below code.</p><pre>&lt;?xml version=”1.0&quot; encoding=”utf-8&quot;?&gt;</pre><pre>&lt;LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android&quot;</pre><pre>xmlns:tools=”http://schemas.android.com/tools&quot;</pre><pre>android:layout_width=”match_parent”</pre><pre>android:layout_height=”match_parent”&gt;</pre><pre>&lt;ImageView</pre><pre>android:id=”@+id/app_widget_image”</pre><pre>android:layout_width=”match_parent”</pre><pre>android:layout_height=”match_parent”</pre><pre>android:layout_weight=”1&quot;</pre><pre>android:src=”@mipmap/ic_launcher “ /&gt;</pre><pre>&lt;TextView</pre><pre>android:id=”@+id/app_widget_text”</pre><pre>android:layout_width=”match_parent”</pre><pre>android:layout_height=”match_parent”</pre><pre>android:layout_weight=”1&quot;</pre><pre>android:gravity=”center”</pre><pre>android:padding=”10dp”</pre><pre>android:text=”Default Text “</pre><pre>android:textSize=”14sp”</pre><pre>android:textStyle=”bold” /&gt;</pre><pre>&lt;Button</pre><pre>android:id=”@+id/app_widget_button”</pre><pre>android:layout_width=”match_parent”</pre><pre>android:layout_height=”match_parent”</pre><pre>android:layout_weight=”1&quot;</pre><pre>android:background=”@color/colorPrimary”</pre><pre>android:paddingLeft=”5dp”</pre><pre>android:paddingRight=”5dp”</pre><pre>android:text=”Refresh “</pre><pre>android:textSize=”12sp” /&gt;</pre><pre>&lt;/LinearLayout&gt;</pre><p><strong>3. Now</strong> create new java class naming AppDataWidget.java that extend AppWidgetProvider. AppWidgetProvider has methods that are called when the app widget is updated, deleted, enabled and disabled among others. For our implementation, we only override onUpdate(), because it is the method called whenever the widget is added to a host.</p><pre>package com.codegradients.homescreenwidget;</pre><pre>import android.app.PendingIntent;</pre><pre>import android.appwidget.AppWidgetManager;</pre><pre>import android.appwidget.AppWidgetProvider;</pre><pre>import android.content.Context;</pre><pre>import android.content.Intent;</pre><pre>import android.content.SharedPreferences;</pre><pre>import android.view.View;</pre><pre>import android.widget.RemoteViews;</pre><pre>import org.json.JSONException;</pre><pre>import org.json.JSONObject;</pre><pre>import java.util.Random;</pre><pre>public class AppDataWidget extends AppWidgetProvider {</pre><pre>private static final String[] refreshStrings = {“Continue Using the Widget.”, “Data Loaded.”, “Done is being loading.”, “No new data found.”, “Refreshed successfully.”};</pre><pre>@Override</pre><pre>public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {</pre><pre>// There may be multiple widgets active, so update all of them</pre><pre>for (int appWidgetId : appWidgetIds) {</pre><pre>updateAppWidget(context, appWidgetManager, appWidgetId);</pre><pre>}</pre><pre>}</pre><pre>public void updateAppWidget(final Context context, final AppWidgetManager appWidgetManager, final int appWidgetId) {</pre><pre>//get random text from refreshStrings</pre><pre>String stringText = refreshStrings[new Random().nextInt(refreshStrings.length)];</pre><pre>// Create an Intent to launch MainActivity</pre><pre>Intent intent = new Intent(context, MainActivity.class);</pre><pre>PendingIntent pendingIntent = PendingIntent.getActivity(context,</pre><pre>0, intent, 0);</pre><pre>// Create an Intent to Refresh MyWidgetProvider</pre><pre>Intent intent1 = new Intent(context, AppDataWidget.class);</pre><pre>intent1.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);</pre><pre>intent1.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetId);</pre><pre>PendingIntent pendingIntent1 = PendingIntent.getBroadcast(context,</pre><pre>0, intent1, 0);</pre><pre>// Get the layout for the App Widget and attach an on-click listener</pre><pre>// to the button and imageview</pre><pre>RemoteViews remoteViews = new RemoteViews(context.getPackageName(),</pre><pre>R.layout.app_widget_layout);</pre><pre>//set the random text</pre><pre>remoteViews.setTextViewText(R.id.app_widget_text, stringText);</pre><pre>//set pending intent1 to action button to refresh Widget</pre><pre>remoteViews.setOnClickPendingIntent(R.id.app_widget_button, pendingIntent1);</pre><pre>//set the pending intent to open MainActivity</pre><pre>remoteViews.setOnClickPendingIntent(R.id.app_widget_image, pendingIntent);</pre><pre>// Tell the AppWidgetManager to perform an update on the current app widget</pre><pre>appWidgetManager.updateAppWidget(appWidgetId, remoteViews);</pre><pre>}</pre><pre>}</pre><p><strong>4. Now</strong> we need to provide AppWidgetProviderInfo metadata that defines additional information, features and data related to the widget. Data such as minimum layout dimensions (width and height), if the widget should be available on the lock screen (Android 4.2 and above), how frequently the widget should be updated, among many others.</p><p>We will create a new XML file called app_data_widget_info.xml in res-&gt;xml folder</p><pre>&lt;?xml version=”1.0&quot; encoding=”utf-8&quot;?&gt;</pre><pre>&lt;appwidget-provider xmlns:android=”http://schemas.android.com/apk/res/android&quot;</pre><pre>android:initialKeyguardLayout=”@layout/app_widget_layout”</pre><pre>android:initialLayout=”@layout/app_widget_layout”</pre><pre>android:minWidth=”40dp”</pre><pre>android:minHeight=”40dp”</pre><pre>android:minResizeHeight=”60dp”</pre><pre>android:minResizeWidth=”60dp”</pre><pre>android:previewImage=”@mipmap/ic_launcher”</pre><pre>android:resizeMode=”vertical|horizontal”</pre><pre>android:updatePeriodMillis=”1800000&quot;</pre><pre>android:widgetCategory=”home_screen”&gt;&lt;/appwidget-provider&gt;</pre><p><strong>5. The final step</strong> is to add the app widget to the AndroidManifest.xml file. Within the &lt;application&gt; &lt;/application&gt; element tags, place the below lines.</p><pre>&lt;! — Declare WidgetProvider →</pre><pre>&lt;receiver android:name=”. AppDataWidget”&gt;</pre><pre>&lt;! — Add APPWIDGET_UPDATE intent filter here to receiver Widget Update →</pre><pre>&lt;intent-filter&gt;</pre><pre>&lt;action android:name=”android.appwidget.action.APPWIDGET_UPDATE” /&gt;</pre><pre>&lt;/intent-filter&gt;</pre><pre>&lt;! — Add app widget provider info xml in meta data →</pre><pre>&lt;meta-data</pre><pre>android:name=”android.appwidget.provider”</pre><pre>android:resource=”@xml/app_widget_provider_info” /&gt;</pre><pre>&lt;/receiver&gt;</pre><p><strong>6. Now</strong> run your app and add a widget onto the home screen and test it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*c5aAlgeomeKstACDXmeH4g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*nP2isK_jTF5ODUlCGvFWdw.jpeg" /></figure><h3><strong>Congratulations. You have done it.</strong></h3><p>Thanks for reading this article. Do tell us if you liked this article, or you face any problem in implementing it in your project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a6ee5b0157b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phone Number Authentication in Android Using Firebase Auth]]></title>
            <link>https://medium.com/@codegradients/phone-number-authentication-in-android-using-firebase-auth-f99cb452a2d0?source=rss-99325e78bd96------2</link>
            <guid isPermaLink="false">https://medium.com/p/f99cb452a2d0</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[number-authentication]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[firebaseauthentication]]></category>
            <dc:creator><![CDATA[Code Gradients]]></dc:creator>
            <pubDate>Thu, 30 Jan 2020 11:29:05 GMT</pubDate>
            <atom:updated>2020-01-30T11:29:05.602Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eQOXNVeL3sqRdg_JNVHfFg.png" /></figure><p>Phone number authentication has become popular in the last few years.</p><p>Validating identity is incredibly important in mobile development, and assuring new user signups are real human beings is critical. Developers need reliable ways to confirm the identities of their users to prevent security issues.</p><p>Well, adding phone number authentication in your app has never been so easier.</p><p><strong>Start By Connecting your project to firebase.</strong></p><p>Developers can implement verification systems using phone numbers in two main ways: either by calling or by sending an SMS containing a code that the user must input.</p><p><strong>Enable Phone Number sign-in for your Firebase project</strong></p><p>To be able to authenticate the user by SMS, you must first enable Phone Number sign-in method in your Firebase console and click save</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s8Y-v7rELG-WVHRgorDMiw.png" /></figure><p>To initialize the Sign-in process, present the user a screen to input his/her phone number. Also note: Alway let the user know they might receive an SMS message for verification and standard rates apply.</p><p>Then, pass their phone number to the PhoneAuthProvider.verifyPhoneNumber method to request that Firebase verify the user&#39;s phone number. For example,</p><pre>PhoneAuthProvider.OnVerificationStateChangedCallbacks callbacks = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {<br>    @Override<br>    public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {<br>        //Detect the SMS Code<br>        String code = phoneAuthCredential.getSmsCode();<br><br>        if (code != null) {<br>            try {<br>                //Verify the Code<br>                verifyVerificationCode(code);<br>            } catch (Exception e) {<br>                e.printStackTrace();<br>            }<br>        }<br>    }<br><br>    @Override<br>    public void onVerificationFailed(FirebaseException e) {<br>        Toast.<em>makeText</em>(OTPVerificationActivity.this, e.getMessage(), Toast.<strong><em>LENGTH_SHORT</em></strong>).show();<br>        Log.<em>v</em>(&quot;Login__&quot;, &quot;Error: exception: &quot; + e);<br>    }<br><br>    @Override<br>    public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingToken forceResendingToken) {<br>        OTPVerificationActivity.this.verificationId = verificationId;<br>    }<br>};<br><br>try {<br>    PhoneAuthProvider.<em>getInstance</em>().verifyPhoneNumber(s, 60, TimeUnit.<strong><em>SECONDS</em></strong>, this, callbacks);<br>} catch (Exception e) {<br>    e.printStackTrace();<br>}</pre><p>Then, this method will be called when you will receive the verification code</p><p>You can also call the method below by taking input from the user and call the function.</p><pre>public void verifyVerificationCode(String otp) {<br>    try {<br>        PhoneAuthCredential credential = PhoneAuthProvider.<em>getCredential</em>(verificationId, otp);<br>        //Sign In The User<br>        signInWithPhoneAuthCredentials(credential);<br>    } catch (Exception e) {<br>        e.printStackTrace();<br>    }<br>}</pre><p>Here comes the main method in which we login into the firebase</p><pre>public void signInWithPhoneAuthCredentials(PhoneAuthCredential credential) {<br>    auth.signInWithCredential(credential).addOnCompleteListener(new OnCompleteListener&lt;AuthResult&gt;() {<br>        @Override<br>        public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {<br>            if (task.isSuccessful()) {<br>//The task is successfull. You are now signed in<br>//navigate to the main activity after signing IN.</pre><pre><br>            } else {<br>                if (task.getException() instanceof FirebaseAuthInvalidCredentialsException) {<br>                    String message = &quot;Invalid Code Entered&quot;;<br>                    avi.setVisibility(View.<strong><em>GONE</em></strong>);<br>                    continueBtn.setEnabled(true);<br>                    Toast.<em>makeText</em>(OTPVerificationActivity.this, message, Toast.<strong><em>LENGTH_SHORT</em></strong>).show();<br>                }<br>            }<br><br>        }<br>    });</pre><p>So you are logged in now.</p><p><strong>Extra Note</strong></p><p>Well, for starters, you will have to add test numbers in the phone auth in firebase auth settings. Like,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rMV4XR2k1V55QdnUOQe0w.png" /></figure><p>But when you release your app to the play store, the firebase will send real authentication codes to your app. To do this, you will have to do this</p><p>Firstly, remove all the test numbers from here(shown above)</p><p>After that get the AUTH key from the play store app(That you have uploaded just now) and paste it in the Firebase Project Settings in SHA certificate fingerprints as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N5VOvvHEk7DBbdocG-69xQ.jpeg" /></figure><p>That’s all. You have successfully implemented Phone Number Authentication in your android App. Congratulations!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ULedhDWpcUcJTyJ7vOKqWw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f99cb452a2d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS Biometric Authentication in Swift]]></title>
            <link>https://medium.com/@codegradients/ios-biometric-authentication-in-swift-718ebb894f3a?source=rss-99325e78bd96------2</link>
            <guid isPermaLink="false">https://medium.com/p/718ebb894f3a</guid>
            <category><![CDATA[iphone]]></category>
            <category><![CDATA[biometric-verification]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[biometrics]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Code Gradients]]></dc:creator>
            <pubDate>Sat, 18 Jan 2020 06:16:46 GMT</pubDate>
            <atom:updated>2020-01-18T06:19:54.019Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>iOS Biometric Authentication in Swift</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VzpZl5xTHyci2QWKCx9dbw.png" /></figure><p><strong>Introduction</strong></p><p>Biometric authentication is used to authenticate into a system using your biological characters such as the face, fingerprints.</p><p>Nowadays mobile devices also provide biometric authentication.</p><p>Mobile devices mostly use two biological characters, one is fingerprint and the other is the face.</p><p>Let’s talk about biometric authentication in the iPhone.</p><p>Until iPhone8 apple provides us only Touch ID using fingerprints of the device owner.</p><p>From the launch of the iPhone X apple introduced authentication using Face also. Apple called it Face ID.</p><p>Now after iPhone X, every iPhone device contains Face ID.</p><p><strong>Implementation</strong></p><p>First, open XCode and create a new project. Select the <em>Single View App</em>.</p><p>Now go to <em>Project Settings &gt; General, </em>scroll down to the <em>Linked Frameworks and Libraries </em>section. Click on + sign and add <em>LocalAuthentication.framework</em>.</p><pre>We will create a local method to authenticate a user called <strong>startAuthentication()</strong></pre><p>We will put logic to authenticate a user in this method.</p><p>To do this we use two methods:</p><pre><strong>canEvaluatePolicy</strong> method — it will return a Bool indicating if device owner authentication is available or not. In simple words, it will indicate whether the user is enrolled in Biometric authentication or not.</pre><pre><strong>evaluatePolicy</strong> method — requests authentication from the user through biometrics or passcode.</pre><p>This method will automatically check which auth system is available like if Touch ID is available it will use Touch ID, and if Face ID is available then it will start authentication using Face ID.</p><p>Note: This method works only on iOS 8.0 or above</p><p>It will present an alert if authentication results in success.</p><pre><strong>func</strong> startAuthentication() {</pre><pre><strong>let</strong> contet = LAContext()</pre><pre><strong>let</strong> reason = “Biometric Authntication testing !! “</pre><pre><strong>var</strong> authError: NSError?</pre><pre><strong>if</strong> <strong>#available</strong>(<strong>iOS</strong> 8.0, <strong>macOS</strong> 10.12.1, *) {</pre><pre><strong>if</strong> contet.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &amp;authError) {</pre><pre>contet.localizedCancelTitle = “Cancel”</pre><pre>contet.localizedFallbackTitle = “”</pre><pre>contet.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: reason) { success, evaluateError <strong>in</strong></pre><pre>DispatchQueue.main.async {</pre><pre><strong>if</strong> success {</pre><pre><strong>let</strong> alert = UIAlertController(title: “Success”, message: “Successfully Authenticated”, preferredStyle: .alert)</pre><pre>alert.addAction(UIAlertAction(title: “Ok”, style: .cancel, handler: <strong>nil</strong>))</pre><pre><strong>self</strong>.present(alert, animated: <strong>true</strong>, completion: <strong>nil</strong>)</pre><pre>} <strong>else</strong> {</pre><pre>// User did not authenticate successfully, look at error and take appropriate action</pre><pre>print(evaluateError?.localizedDescription)</pre><pre>}</pre><pre>}</pre><pre>}</pre><pre>} <strong>else</strong> {</pre><pre>// Could not evaluate policy; look at authError and present an appropriate message to user</pre><pre>print(“Sorry!!.. Could not evaluate policy.\(authError?.localizedDescription)”)</pre><pre>}</pre><pre>} <strong>else</strong> {</pre><pre>print(“This feature is not supported.”)</pre><pre>}</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2tQQXt9AAjS6zwNh98T-0w.jpeg" /></figure><p>Thank you for reading. If you have any questions or suggestions, please let me know in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=718ebb894f3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter, the Future of Mobile Development]]></title>
            <link>https://medium.com/@codegradients/flutter-the-future-of-mobile-development-f6c15cc9bf54?source=rss-99325e78bd96------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6c15cc9bf54</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Code Gradients]]></dc:creator>
            <pubDate>Sat, 18 Jan 2020 05:55:55 GMT</pubDate>
            <atom:updated>2020-01-18T05:55:55.976Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5IqSlkz1ICWRbVnej_RbAg.png" /></figure><p>Android and <a href="https://flutter.dev/">Flutter</a>, both are the babies of Google. One company managing both the native and cross-platform mobile application development for Android apps. Android application development was started at Android Inc which was bought by Google in 2005. The Flutter project began at Google and the first-ever Flutter SDK was released in 2017.</p><p>When it comes to cross-platform mobile application development technology trends, both RN and Flutter are pretty similar in terms of popularity, and both are still quite young (React Native was released in 2015, Flutter in 2018). As of this writing, RN has a bigger community, but given Flutter’s rate of growth, I think it’s safe to say that it will catch up to React Native very soon. It wouldn’t be wrong to say that in the future, the Flutter will be regarded as best platform for cross-platform development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*CQmwkMfapk3Kqgqs-KaZkg.jpeg" /></figure><p><strong>Things that Flutter have (or will have)</strong></p><ol><li><strong>One codebase</strong></li></ol><p>Flutter supports both Android and iOS mobile platforms, and because it renders everything by itself, it lets you run everything off one codebase.</p><p><strong>2. Widget tree</strong></p><p>In Flutter, the user interface is built with widgets, small UI building blocks assembled using a technique called Composition. The whole somewhat resembles using React components. There are two sets of widgets available out of the box: Material Design, which is compatible with Google’s design guidelines, and Cupertino, compatible with Apple’s Human Interface Guidelines for <a href="https://en.wikipedia.org/wiki/IOS">iOS</a>.</p><p><strong>3. Cross-platform</strong></p><p>As already mentioned, the Flutter SDK is a cross-platform tool, that allows us to develop for desktop, mobile, and the Web using a single codebase. Google is still working on support for all platforms, so some features may not be available yet (e.g. the API for desktop is still in development), but it’s possible that Flutter will offer fully cross-platform support quite soon.</p><p><strong>4. Pixel rendering</strong></p><p>Flutter manages every pixel of the screen, so we can be sure that our widgets will look the same on every device (even the older ones), essentially removing our potential device support woes. This, in turn, allows us to create amazing-looking user interfaces that look exactly the same on both Android and iOS with a single codebase.</p><p><strong>5. Hot reload</strong></p><p>This is where Flutter truly shines: hot reload feature provides the ability to introduce changes on-the-fly, allowing you to see them immediately during development.</p><p><strong>6.Automated Support for Build and Release</strong></p><p>Flutter comes with automated support for build and release and a stronger command line support. This makes releasing and updating your mobile app on the Play Store and App Store much, much easier than doing it in the traditional way.</p><p><strong>7. Switchable Themes for iOS and Android<br></strong>Developers have the freedom to pick one among the two separate themes for developing both Android and iOS apps in Flutter. They can choose a Material color for an Android app or some light colors for an iOS app and vice-versa.</p><p>No other cross-platform app development technology offers this functionality until now. Choosing the theme choice entirely depends on the developer and client requirements.</p><h3>Can Flutter dominate over native Android development?</h3><p>Flutter has just released its first stable releases. Google engineers announced Flutter 1.2 at the Mobile World Conference Conference. They have a strong vision and roadmap. Flutter is also being developed with <a href="http://fuchsia/">Fuchsia</a> in mind. We can’t predict the future, but Flutter has the potential to cross all the boundaries.</p><p>Flutter seems to be totally different from all the other cross-platform solutions. Futter apps look native and slick just like the native apps.</p><p><em>As an Android developer, you shouldn’t ignore Flutter. We can’t predict the future, but who knows, Flutter might just as well be the first choice for businesses to develop Android apps. There are some potential reasons for that.</em></p><p>Flutter is hot in the market ever since Google announced the first stable release. Looking at the features of Flutter, lots of questions arise.</p><p>We’ll make no predictions or guesses here, but it could be the alarming bell for native mobile app developers that something like Flutter might affect their role in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zkxKDR3E2xTfZMP3dBRT8w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6c15cc9bf54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Play Videos in iOS using AVPlayerViewController]]></title>
            <link>https://medium.com/@codegradients/play-videos-in-ios-using-avplayerviewcontroller-7c8d92a82e16?source=rss-99325e78bd96------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c8d92a82e16</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[avplayer]]></category>
            <dc:creator><![CDATA[Code Gradients]]></dc:creator>
            <pubDate>Sun, 29 Dec 2019 11:28:39 GMT</pubDate>
            <atom:updated>2019-12-29T11:28:39.191Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>AVPlayerViewController is an object that displays the video content from aa player object providing playback controls also. We can use AVPlayerViewController as a standalone object or embed it into UIView.</p><h3>How to use AVPlayerViewController in Swift</h3><p>if let url = URL(string: “https://www.pathtoyourvideo”) {</p><p>//initialize video player object</p><p>let videoPlayer = AVPlayer(url: url)</p><p>let controller = AVPlayerViewController()</p><p>controller.player = videoPlayer</p><p>present(controller, animated: true) {</p><p>// when presentation gets completed play the video</p><p>videoPlayer.play()</p><p>}</p><p>}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/0*60Jg8Wuy6oWFFqQP" /></figure><h3>Use AVPlayerViewController Within a View</h3><p>if let url = URL(string: “https://www.pathtoyourvideo”) {</p><p>//initialize video player objet</p><p>let videoPlayer = AVPlayer(url: url)</p><p>let controller = AVPlayerViewController()</p><p>controller.player = videoPlayer</p><p>//Add AVPlayerViewController as a child of current view controller</p><p>self.addChild(controller)</p><p>//video_view is a UIView which you have added in your view controller</p><p>//change the frame of AVPlayer</p><p>controller.view.frame = video_view.bounds</p><p>video_view.addSubview(controller.view)</p><p>controller.didMove(toParent: self)</p><p>//start media player</p><p>videoPlayer.play()</p><p>}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/0*fpFYL9irdk618-wk" /></figure><p>You can configure different properties of player like if you don’t want to show video player controls you can use</p><p>controller.showsPlaybackControls = false</p><p>To change video gravity you can use</p><p>controller.videoGravity = .resizeAspectFill</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c8d92a82e16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Five Technologies that are going to hold the future]]></title>
            <link>https://medium.com/@codegradients/five-technologies-that-are-going-to-hold-the-future-927cd4e49c3c?source=rss-99325e78bd96------2</link>
            <guid isPermaLink="false">https://medium.com/p/927cd4e49c3c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Code Gradients]]></dc:creator>
            <pubDate>Sun, 29 Dec 2019 11:03:32 GMT</pubDate>
            <atom:updated>2019-12-29T11:03:32.901Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/860/0*aSg9jVCzSoccnyFZ" /></figure><p>Technology seems to be constantly evolving and for worse or better, is making its path towards speed, sophistication, and ease each year. For many years, technology advances<strong> </strong>at a fast pace and that does not seem to be slowing or stopping down any time soon.</p><p>There are many technologies that have already set their benchmark in the industry and only a few more applications are away from becoming the mainstream.</p><p>These are some of the future technologies that are going to become an incredible future<strong> </strong>in the coming years. So, without wasting much of your time, let’s start listing out these technologies one by one.</p><p><strong>IoT</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wt51hTMjXzqiu8fV" /></figure><p>IoT is driving business changes by providing the data needed to improve marketing, increase sales, and decrease costs, the report found.</p><p>“Everybody in the technology world, as well as many consumers, is hearing the term Internet of Things,” Frank Raimondi, a member of the CompTIA Emerging Technology Community leadership group who works in the strategic channel and business development for Chargifi, said in a press release.</p><p>However, “to say it’s confusing and overwhelming is an understatement,” he added. “IoT may mean many things to many people, but it can clearly mean incremental or new business to a channel partner if they start adding relevant IoT solutions with their existing and new customers. More importantly, they don’t have to start over from scratch.”</p><p>An IoT ecosystem consists of web-enabled smart devices that use embedded processors, sensors and communication hardware to collect, send and act on data they acquire from their environments. IoT Devices share the sensor data they collect by connecting to an IoT gateway or other edge devices where data is either sent to the cloud to be analyzed or analyzed locally. Sometimes, these devices communicate with other related devices and act on the information they get from one another. The devices do most of the work without human intervention, although people can interact with the devices — for instance, to set them up, give them instructions or access the data.</p><p>The connectivity, networking and communication protocols used with these web-enabled devices largely depend on the specific IoT applications deployed.</p><p><strong>Artificial Intelligence (AI)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ndY9aQSifq0RtcPM" /></figure><p>AI is already significantly impacting the way customers interact with businesses via intelligent websites and bots, and these tools are becoming increasingly commoditized and integrated into daily work, the report noted. “The largest impacts across all industries — from retail to healthcare, hospitality to finance — are felt when AI improves data security, decision-making speed and accuracy, and employee output and training,” Maddy Martin, community vice chair and head of growth and education for Smith.ai, said in the release. “With more capable staff, better-qualified sales leads, more efficient issue resolution, and systems that feed actual data back in for future process and product improvements, companies employing AI technologies can use resources with far greater efficiency. Best of all, as investment and competition increase in the AI realm, costs are reduced.”</p><p>Some industry experts believe that the term artificial intelligence is too closely linked to popular culture, causing the general public to have unrealistic fears about artificial intelligence and improbable expectations about how it will change the workplace and life in general. Researchers and marketers hope the label augmented intelligence, which has a more neutral connotation, will help people understand that AI will simply improve products and services, not replace the humans that use them</p><p><strong>Automation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*ityB9yGt99twPoMa" /></figure><p>Along with Artificial Intelligence, Machine Learning, Robots, and Deep Learning, automation has moved quite ahead in the production lines. From packing the product boxes to delivering the items at the doors of the customers, automation seems to be one of the most awaited technologies of the year 2020. The users only need to configure the tool and define the process. In other industries, automation is greatly improving productivity, saving time and cutting costs.</p><p>Automation is evolving quickly and business intelligence in applications is a new form of high-quality automation. In the technology domain, the impact of automation is increasing rapidly, both in the software/hardware and machine layer. However, despite advances in automation, some manual intervention is always advised, even if the tool can perform most of the tasks.</p><p>Food, medical, beverage &amp; customer service will also become further automated and streamlined by the time 2020 hits.</p><h3>Robotics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/0*iEq4fro0gQZMhKn2" /></figure><p>Robotics is automating routine processes by using machines to make businesses faster, less expensive, and more efficient, the report found.</p><p>Robotic engineers are designing the next generation of robots to look, feel and act more human, to make it easier for us to warm up to a cold machine.</p><p>Realistic looking hair and skin with embedded sensors will allow robots to react naturally in their environment. For example, a robot that senses your touch on the shoulder and turns to greet you.</p><p>The rapidly developing relationship between humans and robots is so complex that it has spawned its own field, known as <a href="https://www.wired.com/2017/04/4-things-robots-need-learn-working-humans/">human-robot interaction</a>. The overarching challenge is this: It’s easy enough to adapt robots to get along with humans — make them soft and give them a sense of touch — but it’s another issue entirely to train humans to get along with the machines. With Tug the hospital robot, for example, doctors and nurses learn to treat it like a grandparent — get the hell out of its way and help it get unstuck if you have to.</p><p>The brain behind the beauty will be the key to turning a realistic looking machine into a life-like a robot. AI plays a pivotal role in successful human/robot interaction.</p><h3>Biometrics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*5Pa2r_F-UViQuk_Z" /></figure><p>Biometrics — including the face, fingerprint, and retina scans — are becoming mainstream methods for verifying identity. These methods will form the secure foundation for solutions delivered by IT companies moving forward, CompTIA said.</p><p>Your face is going to become your technology partner by the year 2020. This technology came into light when the iPhone X launched one of the best facial recognition software.</p><p>The stability of the biometric factor can also be important to the acceptance of the factor. Fingerprints do not change over a lifetime, while facial appearance can change drastically with age, illness or other factors.</p><p>In the future, with the help of this technology, the software development companies will be using this technology for developing a series of applications. By 2020, you will be able to unlock your house, car, etc., with the help of facial technology.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=927cd4e49c3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>