<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Anurag Jayaraman</title>
    <description>The latest articles on Forem by Anurag Jayaraman (@anuragjwrites).</description>
    <link>https://forem.com/anuragjwrites</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F636651%2F2b86e844-30eb-498b-a87f-956bf671e80b.jpg</url>
      <title>Forem: Anurag Jayaraman</title>
      <link>https://forem.com/anuragjwrites</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/anuragjwrites"/>
    <language>en</language>
    <item>
      <title>Develop a Cryptocurrency Tracker on Android</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Fri, 09 Jul 2021 11:50:31 +0000</pubDate>
      <link>https://forem.com/applozic/develop-a-cryptocurrency-tracker-on-android-30pp</link>
      <guid>https://forem.com/applozic/develop-a-cryptocurrency-tracker-on-android-30pp</guid>
      <description>&lt;p&gt;&lt;em&gt;This guest post on the Applozic blog was written by Mr. Dennis Muasya. His specialty lies in designing and developing advanced applications for the Android platform. You can check out his personal &lt;a rel="noreferrer noopener" href="http://dmuasya.unaux.com/"&gt;website&lt;/a&gt;&lt;/em&gt; &lt;em&gt;or find him on &lt;a rel="noreferrer noopener" href="https://twitter.com/DenoMtisyer"&gt;Twitter.&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;A cryptocurrency is a form of digital currency that uses cryptography, and its creation and transfer are based on open-source code. Cryptocurrencies had an initial boom in 2009 when Satoshi Nakamoto established the first cryptocurrency, Bitcoin. Since then it has become one of the most valuable types of cryptocurrencies accepted as payment for goods or services worldwide from businesses such as Amazon to Subway sandwich shops! There are now hundreds of types of cryptocurrencies available to trade online. Some popular ones include Ethereum, Ripple XRP (Ripple), Litecoin LTC (LiteCoin), Monero XMR (Monero), Dash DASH (Dash), and more. &lt;/p&gt;

&lt;p&gt;In this age of the digital world, money is constantly changing and what has been popular in recent years are now being replaced by more advanced technologies. The payment industry especially feels these effects with how many people use cryptocurrencies for payments instead of traditional currencies backed up by governments. Japan, alone among other countries such as Venezuela who have also legalized it to some degree alongside others like Switzerland who offer cryptocurrency debit cards that provides access to both Bitcoin or Ethereum funds from your crypto wallet whether you're at home on a laptop or abroad using an ATM card connected over Bluetooth wireless technology without going through any banks whatsoever if they even exist where you currently happen to be located when wanting cash transactions back down south across borders not just domestically but internationally too while fiat currency can't&lt;/p&gt;

&lt;p&gt;In this article, we will create a Bitcoin Tracker App Project in Android using Java and XML. Using a Bitcoin API, the application will display current Bitcoin rates in various regions. There are numerous free APIs accessible, and we will be using CoinMarketCap's API for this project. The API will return a JSON file, which we will parse to meet our requirements. In this app, there will be only one activity. A sample GIF is provided below to give you an idea of what we'll be doing in this article. Why should we confine ourselves to only code? Why not broaden it to include everyday utility chores for us?&lt;/p&gt;

&lt;p&gt;In light of this, I've created the app to demonstrate the capabilities of tracking different cryptocurrencies in real-time on Android smartphones.&lt;/p&gt;

&lt;h2&gt;App Preview&lt;/h2&gt;

&lt;p&gt;It's usually a good idea to have a visual and practical understanding of what you're doing and how it works, so check out the image below to see how this app works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nZTqZJsz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh5.googleusercontent.com/GUuvaVilXRRCiipeK4kt2sK6hfGBUYBaMJOrp4RzUTAY_Y_y7LW8xKFWohNDfrENmfBwpefI9zfw-rjubqRzQkbfcWunJ-3zfkoO6EWPCbasxScu_MG1qLkc60ZJsSAPd1wnbHY0" alt=""&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NIYb3s0T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/WhatsApp-Image-2021-06-04-at-9.09.29-AM-461x1024.jpeg" alt=""&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;em&gt;Screenshots of the CryptoTracker Android app&lt;/em&gt;






&lt;p&gt;The GitHub repository for this project can be found &lt;a href="https://github.com/Dmuasya/CryptoTracker"&gt;here&lt;/a&gt;.&lt;/p&gt;





&lt;h2&gt;Glossary&lt;/h2&gt;





&lt;p&gt;&lt;strong&gt;Cryptocurrency&lt;/strong&gt; is a digitized medium of trade that uses encryption techniques to regulate the generation of units and verify transactions as well as control the transfer of digital currencies. It's impossible to counterfeit, so it has become an attractive currency for many people who are wary of their local economy or want more privacy in their financial dealings. Today, there are over 1,000 different varieties of cryptocurrency in use, with Bitcoin being the most popular by far.&lt;/p&gt;





&lt;p&gt;The &lt;strong&gt;CoinMarketCap API&lt;/strong&gt; is an open-source project that provides a simple interface for retrieving market data. The API supports 38 exchanges, with more coming soon. Bitcoin (BTC), Ethereum (ETH), Bitcoin Cash (BCH), Ripple (XRP), Litecoin (LTC), and many other cryptocurrencies are currently supported.  A list of all the coins can be found on &lt;a href="https://github.com/CoinMarketCap/api#supported-coins"&gt;this page&lt;/a&gt;.&lt;/p&gt;





&lt;p&gt;If you are an Android developer and need to get cryptocurrency prices, the CoinMarketCap API is a great place to start. With this API, you can pull data from multiple exchanges and aggregators in one call. This enables developers to build apps that compare cryptocurrencies across markets or display pricing graphs over time for any currency pair.&lt;/p&gt;





&lt;h2&gt;Steps:&lt;/h2&gt;





&lt;p&gt;Before we start developing, it's a good idea to go over the technologies we'll be using so you don't become confused as we go.&lt;/p&gt;





&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Retrofit &lt;/strong&gt;is a Java and Android-based REST client. It makes retrieving and uploading JSON (or other structured data) using a RESTful web service extremely simple.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RecyclerView &lt;/strong&gt;– Android layouts for better content organization on the screenCreate a new Android Studio project named "CryptoTracker." If you're just getting started, go to any of my prior tutorials on how to set up a new AS project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After you've done creating a new project, install the technology's dependencies.&lt;br&gt;Install the dependencies for the technologies we discussed after you've finished building a new project. Add the following to your app-level build.gradle file:&lt;/p&gt;

&lt;h2&gt;Step 1: Adding required dependencies&lt;/h2&gt;

&lt;p&gt;We'll add the following libraries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To handle REST-API requests, use OKHttp.&lt;/li&gt;
&lt;li&gt;GSon is a tool for quickly parsing and converting JSON data.&lt;/li&gt;
&lt;li&gt;Image fetching and caching in asynchronous mode have been retrofitted (essentially making this project doable in under 30 minutes).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add the following dependencies to the project-level build to get started:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;dependencies {
   implementation fileTree(dir: 'libs', include: ['*.jar'])
   implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
   implementation "com.android.support:support-core-utils:28.0.0-rc01"
   implementation 'com.android.support.constraint:constraint-layout:1.1.2'
   implementation 'com.android.support:recyclerview-v7:28.0.0-rc01'
   implementation 'com.google.code.gson:gson:2.8.2'


   implementation('com.squareup.retrofit2:retrofit:2.1.0') {
       exclude module: 'okhttp'
   }
   implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
   implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
   implementation 'com.squareup.okhttp3:okhttp:3.10.0'
}

&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 2: Adding permissions to the manifest&lt;/h2&gt;

&lt;p&gt;To use the above libraries, we must add the following permission to our AndroidManifest.xml:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;   &amp;lt;uses-permission android:name="android.permission.INTERNET" /&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 3: Creating the activity_main.xml file&lt;/h2&gt;

&lt;p&gt;In our layout format, we must first add the activity main.xml. This is the location where all of our models will be placed. Because this will span my entire operation, I've set the width and height to match_parent. You have the option of selecting the measurements that best suit your requirements. We're utilizing a RecyclerView, as you may have observed, so we'll need to develop a layout for the RecyclerView Item.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   tools:context=".MainActivity"&amp;gt;

   &amp;lt;android.support.v7.widget.RecyclerView
       android:id="@+id/my_recycler_view"
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:scrollbars="vertical" /&amp;gt;

&amp;lt;/android.support.constraint.ConstraintLayout&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;
  
  
  Continue this Tutorial on Applozic Blog!
&lt;/h2&gt;

&lt;p&gt;We have the detailed tutorial with code snippets available on &lt;a href="https://www.applozic.com/blog/how-to-develop-a-cryptocurrency-tracker-on-android/"&gt;Applozic blog&lt;/a&gt; for you to continue with your development!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.applozic.com/blog/how-to-develop-a-cryptocurrency-tracker-on-android/"&gt;Click here&lt;/a&gt; to learn how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create the crypto_list_item.xml file&lt;/li&gt;
&lt;li&gt;Create the MainActivity.java file&lt;/li&gt;
&lt;li&gt;Create the CryptoListAdapter.java file&lt;/li&gt;
&lt;li&gt;See your app in action!&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>crypto</category>
      <category>android</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Firebase: Start up your base or fire up your own servers?</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Wed, 30 Jun 2021 13:17:54 +0000</pubDate>
      <link>https://forem.com/anuragjwrites/firebase-start-up-your-base-or-fire-up-your-own-servers-i2n</link>
      <guid>https://forem.com/anuragjwrites/firebase-start-up-your-base-or-fire-up-your-own-servers-i2n</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://www.applozic.com/blog/firebase-start-up-your-base-or-fire-up-your-own-servers/" rel="noopener noreferrer"&gt;Applozic Blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you clicked this article because of the word "Firebase", you have probably been a part of a mobile application development lifecycle at some point in your life. Some of the services offered by Firebase like &lt;a rel="noreferrer noopener" href="https://firebase.google.com/docs/cloud-messaging"&gt;Firebase Cloud Messaging (FCM)&lt;/a&gt;, &lt;a rel="noreferrer noopener" href="https://firebase.google.com/docs/dynamic-links/"&gt;Firebase Dynamic Links&lt;/a&gt;, &lt;a rel="noreferrer noopener" href="https://firebase.google.com/docs/remote-config/"&gt;Firebase Remote Config&lt;/a&gt; have become synonymous with the features they implement in your applications. At my current organization, &lt;a href="https://www.applozic.com" rel="noopener noreferrer"&gt;Applozic&lt;/a&gt;, FCM is used for &lt;a href="https://dev.to/applozic/applozic-android-sdk-tutorial-4-push-notifications-4a2h"&gt;push notifications for Android applications&lt;/a&gt; built on our platform. At a global level, Firebase is currently among one of the top app development platforms relied upon by developers across the globe.&lt;/p&gt;

&lt;p&gt;That said, Firebase's offerings in the Backend-as-a-Service(BaaS) space are not the be all, end all in terms of application development. In this article, I would like to explore some of the features as well as shortcomings application developers have encountered with Firebase, and whether your application might be better suited with your own backend solution.&lt;/p&gt;

&lt;h2&gt;What is Firebase?&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Firebase helps you develop high-quality apps, grow your user base, and earn more money. Each feature works independently, and they work even better together.&lt;/p&gt;
&lt;cite&gt;https://firebase.google.com/use-cases&lt;/cite&gt;
&lt;/blockquote&gt;

&lt;p&gt;Firebase is a mobile application development platform from Google with powerful features for developing, handling, and enhancing highly functional and versatile web, Android, and iOS platform applications. &lt;/p&gt;

&lt;p&gt;Firebase categorizes its services and by creating solutions of these three main problems for developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a rel="noreferrer noopener" href="https://firebase.google.com/products-build"&gt;Build&lt;/a&gt; : Accelerate and scale app development without managing infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;a rel="noreferrer noopener" href="https://firebase.google.com/products-release"&gt;Release &amp;amp; Monitor&lt;/a&gt; : Release applications with confidence and monitor their performance and stability in realtime. &lt;/li&gt;
&lt;li&gt;
&lt;a rel="noreferrer noopener" href="https://firebase.google.com/products-engage"&gt;Engage&lt;/a&gt; : Boost engagement with rich analytics, A/B testing, and messaging campaigns&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Firebase's ideal customer&lt;/h2&gt;

&lt;p&gt;Firebase Use Cases page has some interesting application use-cases which cover some of their more popular offerings and how these services solved &lt;a rel="noreferrer noopener" href="https://firebase.google.com/use-cases/onefootball"&gt;a business problem&lt;/a&gt; or &lt;a rel="noreferrer noopener" href="https://firebase.google.com/use-cases/fabulous"&gt;boosted the customer retention after onboarding&lt;/a&gt;. Of course, these are the high visibility success stories where businesses were profitable and Firebase helped them take the next step in their development journey. You can find their showcase &lt;a rel="noreferrer noopener" href="https://firebase.google.com/use-cases"&gt;use cases here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To understand what type of customer would benefit the most from Firebase services, let's take a look at their &lt;a rel="noreferrer noopener" href="https://firebase.google.com/pricing"&gt;current pricing plan&lt;/a&gt;, and see how &lt;strong&gt;George &lt;/strong&gt;(a fictional character) created an application using Firebase. &lt;/p&gt;

&lt;h2&gt;Building the basics for your app&lt;/h2&gt;

&lt;p&gt;George woke up from bed with a great idea for an app and wanted to implement the minimum viable product to make sure the idea gets implemented. Firebase offered George unique services with dedicated APIs that helped with the initial setup of creating a database, managing authentication, storage, messaging, testing, etc., without ever having to understand what is going on in the backend. &lt;/p&gt;

&lt;p&gt;The phrase "pace over perfection" is best suited for use cases like this, where the priority is to get a feature implemented over worrying about the nitty-gritty of implementation and since George used only the Free plan, he was able to get an application shipped in minimum possible time. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.applozic.com%2Fblog%2Fwp-content%2Fuploads%2F2021%2F04%2Ffirebase-plans.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.applozic.com%2Fblog%2Fwp-content%2Fuploads%2F2021%2F04%2Ffirebase-plans.png" alt="firebase pricing plans comparison"&gt;&lt;/a&gt;Firebase pricing plans comparison&lt;/p&gt;

&lt;p&gt;A month has passed since George released his app, and he is happy with its success. The app has over 10,000 downloads on mobile and people are using and re-using the app at a moderate level. Everything is great on the public side of the picture. &lt;/p&gt;

&lt;h3&gt;Storage Constraints&lt;/h3&gt;

&lt;p&gt;Behind the scenes though, the application is reaching its quotas on most of the services. George's app has a lot of inbuilt messaging capabilities and users are sending rich messages (GIFs, emoticons, and animated features) and attaching files in one to one conversations and that is fulfilling his Cloud Storage quota rapidly. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.applozic.com%2Fblog%2Fwp-content%2Fuploads%2F2021%2F04%2Fimage-2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.applozic.com%2Fblog%2Fwp-content%2Fuploads%2F2021%2F04%2Fimage-2.png" alt=""&gt;&lt;/a&gt;Free plan vs Paid plan for Firebase Cloud Storage&lt;/p&gt;

&lt;p&gt;George considers moving his storage solution to a more cost efficient service like AWS S3, but finds out that due to a &lt;a rel="noreferrer noopener" href="https://en.wikipedia.org/wiki/Vendor_lock-in"&gt;Vendor lock-in&lt;/a&gt;, he cannot simply migrate from Google Cloud Storage without having to completely rebuild how the app functions. &lt;/p&gt;

&lt;h3&gt;Security Constraints&lt;/h3&gt;

&lt;p&gt;As the number of users increase, George wants to implement phone authentication as a security measure but finds that the quota for Firebase authentication has already reached its limit, and he needs to either scale up to the paid plan or not implement this feature. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.applozic.com%2Fblog%2Fwp-content%2Fuploads%2F2021%2F04%2Fimage-3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.applozic.com%2Fblog%2Fwp-content%2Fuploads%2F2021%2F04%2Fimage-3.png" alt=""&gt;&lt;/a&gt;Free plan vs Paid plan for Firebase Authentication&lt;/p&gt;

&lt;h3&gt;Customization Constraints&lt;/h3&gt;

&lt;p&gt;Seeing the increasing challenges in maintaining his app in a free to download version, George wants to implement a few exclusive features which then he can ship as a paid app for regular users. He wants to implement customized API calls that will utilize the Realtime Database(RTDB) to provide the users with accurate data. However, Firebase APIs are non-customizable and the quotas for the RTDBs are constraining the ability to onboard new users or implement new features. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.applozic.com%2Fblog%2Fwp-content%2Fuploads%2F2021%2F04%2Fimage-4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.applozic.com%2Fblog%2Fwp-content%2Fuploads%2F2021%2F04%2Fimage-4.png" alt=""&gt;&lt;/a&gt;Free plan vs Paid plan for Firebase RTDB&lt;/p&gt;

&lt;h3&gt;Point of no return&lt;/h3&gt;

&lt;p&gt;The time has arrived for George to make a decision regarding the app's future. To ensure his app keeps functioning, he has to take one of the following decisions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Move to the paid plan by sourcing investment and giving up partial/full control over his app. &lt;/li&gt;
&lt;li&gt;Move to the paid plan by monetizing his app and asking users to pay to use the service.&lt;/li&gt;
&lt;li&gt;Move away from Firebase services and create a robust backend and storage solution that can withstand scalability without causing disastrous financial repercussions. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Solution 1 and 2 might be good for the short term if the practicality of cost can be solved by George. However, unless George is able to scale up his development efforts and gain a lot more users for his app, these solutions are not going to help in the long term.  &lt;/p&gt;

&lt;p&gt;Solution 3, while being the most suitable for the long term, is not viable from the perspective of development or immediate implementation. &lt;/p&gt;

&lt;h2&gt;So who exactly is the ideal customer for Firebase?&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you are just starting your app development journey, Firebase and its services are a great place to start implementing a minimum viable product. &lt;/li&gt;
&lt;li&gt;If you are an Enterprise with oodles of funding and already use the Google Cloud platform, Firebase complements your application with robust APIs and services.&lt;/li&gt;
&lt;li&gt;If you are somewhere in between, Firebase might not be the correct solution for you!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;What developers say &lt;/h2&gt;

&lt;p&gt;Multiple articles on blogs and users across social media sites like Reddit, Twitter have opined their  views on Firebase, and I have tried my best to summarize them here.&lt;/p&gt;

&lt;h3&gt;Costs increase exponentially based on data usage&lt;/h3&gt;

&lt;p&gt;As we saw in George's case, Firebase's current pricing plans are suitable for the initial development of an app (free plan using less data) or enterprise level customers (high cost high value). While Firebase does offer a free plan, but that comes with hard quotas and restrictions that might hinder your application's usage.&lt;/p&gt;

&lt;h3&gt;&lt;strong&gt;Works only with NoSQL Databases&lt;/strong&gt;&lt;/h3&gt;

&lt;p&gt;Firebase offers two database options - Firestore and Firebase Realtime Database. Both of these have a NoSQL structure, and there is no option to use a relational database. &lt;/p&gt;

&lt;p&gt;This becomes a big problem when a developer wants to migrate some or all of their services to other providers and since Firebase uses JSON to store data, there is almost no easy way to be able to migrate from the existing database. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Feww-wp.s3.ap-south-1.amazonaws.com%2Fwp-content%2Fuploads%2F2019%2F06%2F11062817%2FMySQL-vs-NoSQL.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Feww-wp.s3.ap-south-1.amazonaws.com%2Fwp-content%2Fuploads%2F2019%2F06%2F11062817%2FMySQL-vs-NoSQL.jpg" alt=""&gt;&lt;/a&gt;Comparison between SQL and NoSQL&lt;/p&gt;

&lt;h3&gt;&lt;strong&gt;Firebase can be geo restricted&lt;/strong&gt;&lt;/h3&gt;

&lt;p&gt;Firebase is a subdomain of Google, and their official website is https://firebase.google.com, the services can be blocked in any country by a domain ban. This means that if George wanted to publish his app in a country where Google cannot be accessed, he will have to rebuild his core infrastructure to something that is available in that country. &lt;/p&gt;

&lt;p&gt;You can find the list of &lt;a rel="noreferrer noopener" href="https://transparencyreport.google.com/traffic/overview"&gt;active disruptions to Google on this page.&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;Vendor Lock In&lt;/h3&gt;

&lt;p&gt;Developing an application using a non open source tool set can be frustrating when you want to add a certain feature or migrate to another service, but due to incompatibility, you are forced to stay with the same service, sometimes at a higher price or lower quality of service. This is called "Vendor Lock In", and it is a prominent detriment in complex applications which use multiple services. &lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;If you are in the beginning stages of your app development journey, and your app can be considered "small" - it doesn’t require complex data queries and relies on real-time updates, Firebase is one of the most robust and cost efficient BaaS that you can utilize. &lt;/p&gt;

&lt;p&gt;However, as the complexity of your app grows and there is an acute need for customization, high volume data transfers, better data structuring for analysis and querying, Firebase loses its sheen. As a developer, it would be more efficient to create your own backend or build upon existing &lt;a href="https://en.wikipedia.org/wiki/Infrastructure_as_a_service" rel="noreferrer noopener"&gt;IaaS&lt;/a&gt; platforms. &lt;/p&gt;

&lt;p&gt;Have you used Firebase services and what prompted you to use/leave Firebase in search of a solution? If you have ever developed using Firebase, do share your experience as a comment below!&lt;/p&gt;

&lt;p&gt;Learn how to set up your Android application with Firebase in 4 easy steps! &lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/applozic" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__org__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F4160%2F2cf95956-1adc-4cce-b895-d3bd1937450a.png" alt="Applozic Inc"&gt;
      &lt;div class="ltag__link__user__pic"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F636651%2F2b86e844-30eb-498b-a87f-956bf671e80b.jpg" alt=""&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/applozic/applozic-android-sdk-tutorial-4-push-notifications-4a2h" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Applozic Android SDK Tutorial 4 – Push Notifications using Firebase&lt;/h2&gt;
      &lt;h3&gt;Anurag Jayaraman for Applozic Inc ・ Jun 30 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#android&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#firebase&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#applozic&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>firebase</category>
      <category>opinion</category>
      <category>startup</category>
      <category>technology</category>
    </item>
    <item>
      <title>Applozic Android SDK Tutorial 4 – Push Notifications using Firebase</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Wed, 30 Jun 2021 12:58:03 +0000</pubDate>
      <link>https://forem.com/applozic/applozic-android-sdk-tutorial-4-push-notifications-4a2h</link>
      <guid>https://forem.com/applozic/applozic-android-sdk-tutorial-4-push-notifications-4a2h</guid>
      <description>&lt;p&gt;This tutorial is Part 4 of a multi-part series covering Applozic Android SDK integration into an Android app.&lt;/p&gt;

&lt;p&gt;Our goal is to learn the following steps in this tutorial:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create FCM key for your app in Firebase&lt;/li&gt;
&lt;li&gt;Enable FCM notifications from Applozic dashboard&lt;/li&gt;
&lt;li&gt;Integrate Firebase handler in your app&lt;/li&gt;
&lt;li&gt;Process the received notifications&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can download the sample Android chat app from &lt;a rel="noreferrer noopener" href="https://github.com/AppLozic/Applozic-Android-SDK"&gt;Applozic GitHub&lt;/a&gt;.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;💡 If you already have FCM set up for your app, move directly to Step 2. 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h2&gt;Firebase and FCM key&lt;/h2&gt;





&lt;p&gt;Firebase is a mobile application development platform from Google with powerful features for developing, handling, and enhancing highly functional and versatile web, Android, and iOS platform applications. &lt;/p&gt;




&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;💡 FCM (Firebase Cloud Messaging) was previously called GCM (Google Cloud Messaging).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To learn more about Firebase's features and use cases, check out my &lt;a href="https://dev.to/anuragjwrites/firebase-start-up-your-base-or-fire-up-your-own-servers-i2n"&gt;dev.to&lt;/a&gt; post: &lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/anuragjwrites" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OW7pBmt7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--UpfxykjL--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/636651/2b86e844-30eb-498b-a87f-956bf671e80b.jpg" alt="anuragjwrites"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/anuragjwrites/firebase-start-up-your-base-or-fire-up-your-own-servers-i2n" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Firebase: Start up your base or fire up your own servers?&lt;/h2&gt;
      &lt;h3&gt;Anurag Jayaraman ・ Jun 30 '21 ・ 8 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#firebase&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#opinion&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#startup&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#technology&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;h3&gt;Generate FCM key in Firebase&lt;/h3&gt;

&lt;p&gt;Login to the &lt;a href="https://console.firebase.google.com/"&gt;Firebase Developer Console&lt;/a&gt; and click on "&lt;strong&gt;Create a project&lt;/strong&gt;".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--snnGgvRK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-17.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--snnGgvRK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-17.png" alt="Firebase main screen" width="880" height="872"&gt;&lt;/a&gt;Firebase Main Screen&lt;/p&gt;

&lt;p&gt;In your project dashboard, click on the "&lt;strong&gt;Settings" &lt;/strong&gt;icon &amp;gt; "&lt;strong&gt;Project &lt;/strong&gt;settings".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iY-rTseH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-18.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iY-rTseH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-18.png" alt="Project settings" width="444" height="434"&gt;&lt;/a&gt;Project settings&lt;/p&gt;

&lt;p&gt;Go to the&lt;strong&gt; "Cloud Messaging" &lt;/strong&gt;tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gEZN8HGI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-19.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gEZN8HGI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-19.png" alt="Cloud Messaging tabs" width="880" height="204"&gt;&lt;/a&gt;Cloud Messaging tabs&lt;/p&gt;

&lt;p&gt;The "&lt;strong&gt;Server key" &lt;/strong&gt;and the "&lt;strong&gt;Sender ID&lt;/strong&gt;" are your private credentials. &lt;br&gt;Leave this tab open and proceed to the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WgA-BHuV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-20-1024x808.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WgA-BHuV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-20-1024x808.png" alt="Server key location" width="880" height="694"&gt;&lt;/a&gt;Server key location&lt;/p&gt;

&lt;h2&gt;Set up FCM Notifications&lt;/h2&gt;

&lt;p&gt;The Server key is an API key that is a unique string used to route requests to your Firebase project when interacting with Firebase and Google services.&lt;/p&gt;

&lt;p&gt;Your FCM credentials are unique to the project you have created, so keep them secure and do not share them with anyone.  &lt;/p&gt;

&lt;h3&gt;Update FCM Server key in Applozic Dashboard.&lt;/h3&gt;

&lt;p&gt;Go to your &lt;strong&gt;&lt;a href="https://console.applozic.com/settings/pushnotification"&gt;Appl&lt;/a&gt;&lt;a rel="noreferrer noopener" href="https://console.applozic.com/settings"&gt;ozic Dashboard.&lt;/a&gt;&lt;/strong&gt; Click on "Settings".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gdf2Xceh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gdf2Xceh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-21.png" alt="Settings in Applozic Dashboard." width="350" height="149"&gt;&lt;/a&gt;Settings in Applozic Dashboard&lt;/p&gt;

&lt;p&gt;Click on "Chat" &amp;gt; "Notifications".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FWB7zYx5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-22-1024x652.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FWB7zYx5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-22-1024x652.png" alt="Notification tab under Chat" width="880" height="560"&gt;&lt;/a&gt;Notification tab under Chat&lt;/p&gt;

&lt;p&gt;Click "Add Credentials" under FCM and paste the "Server Key" from Firebase credentials.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KPOQBhX6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KPOQBhX6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-23.png" alt="Add FCM Credentials" width="732" height="546"&gt;&lt;/a&gt;Add FCM Credentials&lt;/p&gt;

&lt;p&gt;Voila! Your app is set up for use with FCM. &lt;/p&gt;

&lt;h2&gt;
  
  
  Continue this Tutorial on Applozic Blog!
&lt;/h2&gt;

&lt;p&gt;We have the detailed tutorial with code snippets available on &lt;a href="https://www.applozic.com/blog/applozic-android-sdk-tutorial-4-push-notifications-firebase/"&gt;our blog&lt;/a&gt; for you to continue with your integration!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.applozic.com/blog/applozic-android-sdk-tutorial-4-push-notifications-firebase/"&gt;Click here&lt;/a&gt; to learn how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrate FCM in your application&lt;/li&gt;
&lt;li&gt;Process the received notifications&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>android</category>
      <category>tutorial</category>
      <category>firebase</category>
      <category>applozic</category>
    </item>
    <item>
      <title>Applozic Android SDK Tutorial 3 - Chat Conversations</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Wed, 30 Jun 2021 09:32:10 +0000</pubDate>
      <link>https://forem.com/applozic/applozic-android-sdk-tutorial-3-chat-conversations-2e7c</link>
      <guid>https://forem.com/applozic/applozic-android-sdk-tutorial-3-chat-conversations-2e7c</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This tutorial is Part 3 of a multi-part series covering Applozic Android SDK integration into an Android app.&lt;/p&gt;

&lt;p&gt;Our goal is to learn the following steps in this tutorial:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Launch Conversation list screen&lt;/li&gt;
&lt;li&gt;Create individual chat thread&lt;/li&gt;
&lt;li&gt;Create group chat thread&lt;/li&gt;
&lt;li&gt;Create context based chat thread&lt;/li&gt;
&lt;li&gt;Delete chat threads&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can download the sample Android chat app from &lt;a href="https://github.com/AppLozic/Applozic-Android-SDK" rel="noreferrer noopener"&gt;Applozic GitHub&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;Conversation screen&lt;/h2&gt;

&lt;p&gt;To give you an idea of what the conversation screen would look like in the final app, take a look at the screenshot below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dpexCAdE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/tutorial-3-chat-screen-461x1024.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dpexCAdE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/tutorial-3-chat-screen-461x1024.jpg" alt="conversation screen"&gt;&lt;/a&gt;Android Conversation screen&lt;/p&gt;

&lt;p&gt;To get started with such a conversation screen, add the following code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Intent intent = new Intent(this, ConversationActivity.class);            
startActivity(intent);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can set this to activate as soon as the user opens the conversation screen. &lt;/p&gt;

&lt;h2&gt;Individual Chat&lt;/h2&gt;

&lt;p&gt;From the main conversation screen, the user can choose to launch either an individual conversation thread or a group chat thread. &lt;/p&gt;

&lt;p&gt;An individual chat screen will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vs5owbWd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/tutorial-3-single-chat-screen-461x1024.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vs5owbWd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/tutorial-3-single-chat-screen-461x1024.jpg" alt="Individual chat screen"&gt;&lt;/a&gt;Individual chat screen&lt;/p&gt;

&lt;p&gt;For starting individual conversation thread, set "userId" in intent:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Intent intent = new Intent(this, ConversationActivity.class);            
intent.putExtra(ConversationUIService.USER_ID, "receiveruserid123");   
intent.putExtra(ConversationUIService.DISPLAY_NAME, "Receiver display name"); 
//to display the title.
intent.putExtra(ConversationUIService.TAKE_ORDER,true); 
//Skip chat list on back press 
startActivity(intent);&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Group Chat&lt;/h2&gt;

&lt;p&gt;A group conversation contains multiple users that can send and receive messages. Internally, a group conversation is referred to as a &lt;strong&gt;channel&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Applozic supports multiple group types that serve different purposes. &lt;/p&gt;


&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;&lt;tr&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Private Group&lt;/td&gt;
&lt;td&gt;Private groups are not accessible to contacts other than the ones present in the group. Only group admin can add/remove members in the group. You can create private groups to facilitate close, WhatsApp style interactions. For example, doctor-patient chats.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Public Group&lt;/td&gt;
&lt;td&gt;Users will be able to search and join Public groups. Any group member can add/remove members in this group. For example, Public groups can be used to create area-wise communities in a social app where users can search their area's community and join.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Broadcast Group&lt;/td&gt;
&lt;td&gt;A message can be sent to several contacts at once. Messages sent in the broadcast group are received by the members of the group as one-to-one chat thread. Only the sender can see the broadcast group. The broadcast group works on a similar behavior as that of WhatsApp broadcasts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Open Group&lt;/td&gt;
&lt;td&gt;Used for free-flowing chats such as live streaming chats, live event chats etc. You need not add any members to this group. All users present on the chat screen will receive messages via MQTT (&lt;a rel="noreferrer noopener" href="https://www.applozic.com/blog/real-time-updates-in-your-chat-app-using-pub-sub/"&gt;publish/subscribe pattern&lt;/a&gt;). Push notifications are not supported in Open groups.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;GroupOfTwo&lt;/td&gt;
&lt;td&gt;Used for the purpose where dealers are selling products and any particular user wants to chat about multiple products with the same dealer. At that time, it is required to show two different chat threads in the conversation history as the context (product) of the chats is different.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;Contacts Group&lt;/td&gt;
&lt;td&gt;Used for creating Friends/Favorites contact List. These lists can be maintained on the application level and any member of the group can access it. For example, an event management company can use the lists to maintain attendees of an event at one place.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Support Group&lt;/td&gt;
&lt;td&gt;Best suited for people who want to use Applozic's sister product, &lt;a href="https://www.kommunicate.io/"&gt;Kommunicate&lt;/a&gt;. These groups are specifically built for the purpose of customer support chat and may contain multiple team members and chatbots talking to a user.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
Table showcasing different group types



&lt;h2&gt;
  
  
  Continue this Tutorial on Applozic Blog!
&lt;/h2&gt;

&lt;p&gt;We have the detailed tutorial with code snippets available on &lt;a href="https://www.applozic.com/blog/applozic-android-sdk-tutorial-3-chat-conversations/"&gt;our blog&lt;/a&gt; for you to continue with your integration!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.applozic.com/blog/applozic-android-sdk-tutorial-3-chat-conversations/"&gt;Click here&lt;/a&gt; to learn how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a group chat thread&lt;/li&gt;
&lt;li&gt;Create a context based chat thread&lt;/li&gt;
&lt;li&gt;Delete chat threads&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>android</category>
      <category>tutorial</category>
      <category>java</category>
      <category>applozic</category>
    </item>
    <item>
      <title>Android SDK Tutorial 2 – Authentication and Authorization</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Wed, 16 Jun 2021 20:19:30 +0000</pubDate>
      <link>https://forem.com/applozic/android-sdk-tutorial-2-authentication-and-authorization-3lf9</link>
      <guid>https://forem.com/applozic/android-sdk-tutorial-2-authentication-and-authorization-3lf9</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This tutorial is Part 2 of a multi-part series covering Applozic Android SDK integration into an Android app. &lt;/p&gt;

&lt;p&gt;Our goal is to complete the following steps in this tutorial:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Learn how to generate an access token for your application&lt;/li&gt;
&lt;li&gt;Create a User Object&lt;/li&gt;
&lt;li&gt;Register/Login the user&lt;/li&gt;
&lt;li&gt;Update password for user&lt;/li&gt;
&lt;li&gt;Update User Details&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;What are Authentication and Authorization?&lt;/h2&gt;

&lt;p&gt;In the simplest terms, we can classify them as: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt;: Proving your identity to an entity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authorization&lt;/strong&gt;: The ability to interact with an entity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zggDP9Uo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/Android-SDK-Tutorial-2-Authentication-and-Authorization-Image-02-02-02-1024x551.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zggDP9Uo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/Android-SDK-Tutorial-2-Authentication-and-Authorization-Image-02-02-02-1024x551.png" alt=""&gt;&lt;/a&gt;Authentication vs Authorization&lt;/p&gt;

&lt;p&gt;Authentication and authorization with APIs have a lot of value, some of them are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authenticate that calls to the API are done by registered users only&lt;/li&gt;
&lt;li&gt;Maintain a record to track which user is making the requests&lt;/li&gt;
&lt;li&gt;Track the total usage of the API calls across users and applications&lt;/li&gt;
&lt;li&gt;Notify any user who exceeds their plan limit&lt;/li&gt;
&lt;li&gt;Apply different permission levels to different users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that we have learnt the need for authentication and authorization, let's get started with the first step in this tutorial.&lt;/p&gt;

&lt;h2&gt;Generating Access Token&lt;/h2&gt;

&lt;p&gt;Access Token URL (Authentication URL) is required to ensure your platforms are safe from unauthorized access. This can be configured by the Application admin in Applozic Dashboard for authenticating users from your backend server.&lt;/p&gt;

&lt;h3&gt;Setup Access Token URL in Dashboard&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Login to &lt;a rel="noreferrer noopener" href="https://dashboard.applozic.com/admin/dashboard.html#"&gt;Applozic Dashboard&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Go to Dashboard. Select Application -&amp;gt; Action -&amp;gt; Edit -&amp;gt; Security.&lt;/li&gt;
&lt;li&gt;Enter your server URL for authentication in the "Access Token URL" field.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QFWkYCtm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-15-1024x348.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QFWkYCtm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-15-1024x348.png" alt=""&gt;&lt;/a&gt;Application screen in Dashboard&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--esUFu3Aa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-16-1024x279.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--esUFu3Aa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-16-1024x279.png" alt=""&gt;&lt;/a&gt;Security Tab in Edit Application settings&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Note: Configured Access Token URL should accept POST request with data passed as request body in form-url-encoded.&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can now use an API testing tool like Postman to verify your access. &lt;/p&gt;

&lt;h2&gt;
  
  
  Continue this Tutorial on Applozic Blog!
&lt;/h2&gt;

&lt;p&gt;We have the detailed tutorial with code snippets available on &lt;a href="https://www.applozic.com/blog/applozic-android-sdk-tutorial-2/"&gt;our blog&lt;/a&gt; for you to continue with your integration!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.applozic.com/blog/applozic-android-sdk-tutorial-2/"&gt;Click here&lt;/a&gt; to learn how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a User Object&lt;/li&gt;
&lt;li&gt;Register/Login the user&lt;/li&gt;
&lt;li&gt;Update password and User details&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please leave your feedback and doubts in the comments below!&lt;/p&gt;

</description>
      <category>android</category>
      <category>tutorial</category>
      <category>applozic</category>
    </item>
    <item>
      <title>Applozic Android SDK Tutorial 1 – Setup and Configuration</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Fri, 11 Jun 2021 09:02:03 +0000</pubDate>
      <link>https://forem.com/applozic/applozic-android-sdk-tutorial-1-setup-and-configuration-17lg</link>
      <guid>https://forem.com/applozic/applozic-android-sdk-tutorial-1-setup-and-configuration-17lg</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this tutorial you will be learning how to integrate the basic functionalities  of &lt;a href="https://www.applozic.com/platform/chat-messaging/"&gt;Applozic Android SDK&lt;/a&gt; to get started with your own chat application.&lt;/p&gt;

&lt;p&gt;Our goal is to complete the following steps in this tutorial:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create Applozic account and receive API key&lt;/li&gt;
&lt;li&gt;Set up Android Studio&lt;/li&gt;
&lt;li&gt;Integrate Applozic Chat SDK in your app&lt;/li&gt;
&lt;li&gt;Configure the basic dependencies for your app&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can refer to the Applozic Android SDK documentation &lt;a href="https://docs.applozic.com/docs/android-chat-sdk"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Applozic account (&lt;a href="https://console.applozic.com/signup?product=applozic"&gt;Create your account here&lt;/a&gt;) for API/Application Key&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.android.com/studio"&gt;Android Studio&lt;/a&gt; (latest version)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Create Applozic account
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Sign Up
&lt;/h3&gt;

&lt;p&gt;Enter your personal dashboard after signing up for Applozic.&lt;/p&gt;

&lt;p&gt;Enter your personal dashboard after &lt;a rel="noreferrer noopener" href="https://console.applozic.com/signup?product=applozic"&gt;signing up for Applozic&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WmhFYUg2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WmhFYUg2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image.png" alt="Sign up screen"&gt;&lt;/a&gt;Sign up screen&lt;/p&gt;

&lt;h3&gt;Get your App ID&lt;/h3&gt;

&lt;p&gt;Go to Settings &amp;gt; Configuration &amp;gt; Install. &lt;br&gt;Copy the App ID and use it whenever required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xBjjPAAc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-1-1024x686.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xBjjPAAc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-1-1024x686.png" alt="This is your App ID. You can use this as a unique key for your application."&gt;&lt;/a&gt;This is your App ID. You can use this as a unique key for your application.&lt;/p&gt;

&lt;h2&gt;Set up Android Studio&lt;/h2&gt;

&lt;h3&gt;Creating New Project&lt;/h3&gt;

&lt;p&gt;Create a new project using &lt;strong&gt;File ➙ New Project&lt;/strong&gt; on the top right of the application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wcO7spdW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wcO7spdW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-2.png" alt="Create a new project"&gt;&lt;/a&gt;Create a new project&lt;/p&gt;

&lt;p&gt;Select "Empty Activity" from the list under "Phone and Tablet"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jcYI5_53--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jcYI5_53--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-3.png" alt="Select Empty Activity &amp;gt; Next"&gt;&lt;/a&gt;Select Empty Activity &amp;gt; Next&lt;/p&gt;

&lt;p&gt;Rename the project as per your preference. I will name mine as &lt;strong&gt;applozic-tutorial-app&lt;/strong&gt;. &lt;br&gt;Make sure to set the minimum SDK as &lt;strong&gt;Android 6.0&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3un2-tCR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3un2-tCR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-4.png" alt="Add a unique name and set the minimum SDK supported"&gt;&lt;/a&gt;Add a unique name and set the minimum SDK supported&lt;/p&gt;

&lt;p&gt;Wait for your background tasks to complete.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1ld9kVPm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1ld9kVPm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/06/image-5.png" alt="Background tasks"&gt;&lt;/a&gt;Background tasks&lt;/p&gt;

&lt;h2&gt;
  
  
  Continue this Tutorial on Applozic Blog!
&lt;/h2&gt;

&lt;p&gt;We have the detailed tutorial with code snippets available on &lt;a href="https://www.applozic.com/blog/applozic-android-sdk-tutorial-1/"&gt;our blog&lt;/a&gt; for you to continue with your integration!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.applozic.com/blog/applozic-android-sdk-tutorial-1/"&gt;Click here&lt;/a&gt; to learn how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrate Applozic Chat SDK in your app&lt;/li&gt;
&lt;li&gt;Configure the basic dependencies for your app&lt;/li&gt;
&lt;li&gt;Configure ProGuard rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please leave your feedback and doubts in the comments below!&lt;/p&gt;

</description>
      <category>android</category>
      <category>tutorial</category>
      <category>applozic</category>
    </item>
    <item>
      <title>Real Time updates in your iOS app using Pub/Sub</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Wed, 26 May 2021 07:31:49 +0000</pubDate>
      <link>https://forem.com/applozic/real-time-updates-in-your-ios-app-using-pub-sub-1p1p</link>
      <guid>https://forem.com/applozic/real-time-updates-in-your-ios-app-using-pub-sub-1p1p</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This tutorial will cover how to set up real-time updates for your application using &lt;a href="https://www.applozic.com/"&gt;Applozic&lt;/a&gt; SDK integrations.&lt;/p&gt;

&lt;p&gt;You will learn how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Subscribe/unsubscribe to topics and handle callbacks.&lt;/li&gt;
&lt;li&gt;Setup typing status indicators in your 1-to-1 and group chats.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;a href="https://github.com/AppLozic"&gt;Applozic SDKs&lt;/a&gt;, real-time updates are handled by the pub-sub messaging pattern. Let's take a look at some of the basic concepts of what pub-sub means in a messaging paradigm.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Publish-Subscribe messaging pattern
&lt;/h2&gt;

&lt;p&gt;In a publish-subscribe (often called pub-sub for brevity) architecture, a central source of information called a &lt;strong&gt;broker&lt;/strong&gt; receives and distributes all data in the network. Pub-sub clients can publish data to the broker or subscribe to get data from it—or both.&lt;/p&gt;

&lt;p&gt;The important concept to remember in pub-sub is that a communication channel &lt;a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern"&gt;topic&lt;/a&gt; is set up between a server and several clients. This channel is represented by a persistent network communication (WebSocket, MQTT, etc.). The intermediary which handles data transfer based on subscriptions is called the broker.&lt;/p&gt;

&lt;p&gt;The broker does not store data; it simply moves it from publishers to subscribers. When data comes in from a publisher, the broker promptly sends it off to any client subscribed to that data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VZI4hubV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://d1.awsstatic.com/product-marketing/Messaging/sns_img_topic.e024462ec88e79ed63d690a2eed6e050e33fb36f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VZI4hubV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://d1.awsstatic.com/product-marketing/Messaging/sns_img_topic.e024462ec88e79ed63d690a2eed6e050e33fb36f.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;
Pub-Sub message flow



&lt;p&gt;This is different from the standard request/response (pull) models in which publishers check if new data has become available. This makes the pub/sub method the most suitable framework for streaming data in real-time. It also means that dynamic networks can be built at scale using pub-sub architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up real-time updates in your application
&lt;/h2&gt;

&lt;p&gt;As a starting point for this tutorial, we are going to consider that you already have a working application and have implemented one of the Applozic Chat SDKs.&lt;/p&gt;

&lt;p&gt;You can follow these tutorial articles in case you want to set up your application with the &lt;a href="https://www.applozic.com/blog/build-chat-app-using-applozic-swift-sdk/"&gt;iOS Chat SDK&lt;/a&gt; or &lt;a href="https://www.applozic.com/blog/how-to-build-an-ios-app-for-real-time-communication-with-voice-and-video/"&gt;iOS Voice and Video SDK&lt;/a&gt; offered by Applozic.&lt;/p&gt;

&lt;p&gt;If you face any difficulties while following this tutorial, you can contact us at &lt;a href="mailto:support@applozic.com"&gt;support@applozic.com&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connecting to publish
&lt;/h3&gt;

&lt;p&gt;In order for a subscriber to receive messages on a topic, it needs to be subscribed and also needs a custom security policy to allow the topic to deliver messages to the queue. The following code handles both of these for you, without you ever having to deal with the details around building that custom policy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Note: Please replace &amp;lt;APP_ID&amp;gt; with your App Id

ApplozicClient *applozicClient = [[ApplozicClient alloc]initWithApplicationKey:@"&amp;lt;APP_ID&amp;gt;" withDelegate:self];

[self.applozicClient subscribeToConversation];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Disconnecting from publish
&lt;/h3&gt;

&lt;p&gt;If you want a subscriber to stop receiving messages on a topic, you can disconnect using the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[self.applozicClient unsubscribeToConversation];
Note: subscribeToConversation and unsubscribeToConversation need to be called in Appdelegate 
and in your VIewController file also where you want callbacks in 
applicationWillEnterForeground or applicationDidEnterBackground
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setting up Typing Status Indicator
&lt;/h3&gt;

&lt;p&gt;Typing indicators allow you to indicate if users are typing messages in a 1-to-1 or group chat. You can trigger a typing event when a user starts typing a message and this will let the user publish their typing status to anyone who has subscribed for the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sending typing status
&lt;/h3&gt;

&lt;p&gt;You can publish your typing status using the code given below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[self.applozicClient sendTypingStatusForUserId:recieverUserId orForGroupId:channelKey withTyping:isTypingStarted];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Call the above method once a user starts typing in &lt;code&gt;textViewDidChange&lt;/code&gt; or stops typing in &lt;code&gt;textViewDidEndEditing&lt;/code&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Argument&lt;/td&gt;
&lt;td&gt;Type&lt;/td&gt;
&lt;td&gt;Description&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;recieverUserId&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;Pass recieverUserId in case of 1-to-1 typing status and pass channelKey as nil&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;channelKey&lt;/td&gt;
&lt;td&gt;  NSNumber    &lt;/td&gt;
&lt;td&gt;Pass channelKey in case of group/channel typing status and pass recieverUserId as nil&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;  isTypingStarted    &lt;/td&gt;
&lt;td&gt;Bool&lt;/td&gt;
&lt;td&gt;Pass true or YES in case user started typing&lt;br&gt;Pass false or NO in case user stopped typing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Continue this Tutorial on Applozic Blog!
&lt;/h2&gt;

&lt;p&gt;We have the detailed tutorial with code snippets available on &lt;a href="https://www.applozic.com/blog/"&gt;our blog&lt;/a&gt; for you to continue with your integration!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.applozic.com/blog/real-time-updates-in-your-chat-app-using-pub-sub/"&gt;Click here to learn&lt;/a&gt; how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handle the delegate callbacks&lt;/li&gt;
&lt;li&gt;Subscribing and Unsubsribing to typing status&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please leave your feedback and doubts in the comments below!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>ios</category>
      <category>applozic</category>
      <category>pubsub</category>
    </item>
    <item>
      <title>Integrate voice and video chat in your iOS app</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Wed, 26 May 2021 07:24:38 +0000</pubDate>
      <link>https://forem.com/applozic/integrate-voice-and-video-chat-in-your-ios-app-3dk5</link>
      <guid>https://forem.com/applozic/integrate-voice-and-video-chat-in-your-ios-app-3dk5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Applozic's &lt;a href="https://github.com/AppLozic/Applozic-iOS-Audio-Video-SDK"&gt;iOS Audio and Video Call SDK&lt;/a&gt; provides you with all the necessary components to build a real time chat with voice and video capabilities within your application, and enables you as a developer to implement conversational chat, push notifications, group chat, picture in picture and many more such features!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UgmwpAPV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/04/support-chat-voice-and-video.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UgmwpAPV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.applozic.com/blog/wp-content/uploads/2021/04/support-chat-voice-and-video.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the worldwide effects of Covid-19 and the resulting governmental lockdowns was the acute &lt;a rel="noreferrer noopener" href="https://www.reportsanddata.com/report-detail/web-real-time-communication-market"&gt;rise in the need for real time communication across multiple industries&lt;/a&gt;. A few major ones, like healthcare, education, and technology support witnessed the birth and rapid growth of first to market applications that catered to the varied needs of the customer. For example, &lt;a rel="noreferrer noopener" href="https://www.applozic.com/blog/top-6-uses-of-in-app-messaging-real-time-communication-in-healthcare/"&gt;the features offered in telemedicine&lt;/a&gt; caused much needed disruption in a field with vital importance on immediate communication. &lt;/p&gt;

&lt;p&gt;In this tutorial, we will leverage the &lt;a rel="noreferrer noopener" href="https://github.com/AppLozic/Applozic-iOS-Audio-Video-SDK"&gt;Applozic iOS Voice and Video SDK&lt;/a&gt; to create a real time chat application that can be used across industries like real time customer support, 1 on 1 telemedicine, personal therapy, etc. &lt;a rel="noreferrer noopener" href="https://answers.applozic.com/article/Is-Applozic-compliant-with-HIPAA"&gt;With HIPAA compliant security on all your conversations&lt;/a&gt; and &lt;a rel="noreferrer noopener" href="https://answers.applozic.com/article/How-can-we-customise-the-default-UI-or-build-our-own-UI-on-Applozic"&gt;programmable personalization capabilities&lt;/a&gt; to improve customer experiences, Applozic enables you to drive better engagement, increase interactions with your users, and improve your chances of retaining those customers through high-quality video and audio.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating your own real time communication app
&lt;/h2&gt;

&lt;p&gt;Applozic Audio-Video Call SDK provides high-quality IP audio and video calls capabilities within your application. With this SDK, your application's users can take part in secure 1-to-1 calls and automate workflows by building reliable conversation systems through voice-calling and video-calling. You can create a standalone application for communication using this SDK, or integrate it with your existing application.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: The Voice and Video SDK is a beta product and new features will be added in the upcoming months.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you face any difficulties while following this tutorial, you can contact us at &lt;a rel="noreferrer noopener" href="mailto:support@applozic.com"&gt;&lt;/a&gt;&lt;a href="mailto:support@applozic.com"&gt;support@applozic.com&lt;/a&gt;.&lt;br&gt;To check out our cocoapods sample app, &lt;a rel="noreferrer noopener" href="https://github.com/AppLozic/Applozic-iOS-Audio-Video-SDK"&gt;click here.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;p&gt;Here are some of the dependencies you will need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Xcode 12.0 or later&lt;/li&gt;
&lt;li&gt;CocoaPods 1.9.0 or later&lt;/li&gt;
&lt;li&gt;Your project must target iOS 11 or higher&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;We are assuming the following application is going to be written using Objective-C. For corresponding code in Swift, please check the documentation in our &lt;a href="https://github.com/AppLozic/Applozic-iOS-Audio-Video-SDK"&gt;github repository&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Application Setup
&lt;/h3&gt;

&lt;p&gt;To use the Applozic  iOS Audio Video SDK and leverage pre-built components that you can easily customize, you can &lt;a rel="noreferrer noopener" href="https://console.applozic.com/signup?product=applozic"&gt;sign up for Applozic &lt;/a&gt;and &lt;a rel="noreferrer noopener" href="https://console.applozic.com/settings/install"&gt;get your APP_ID from the install section of the console.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation - Setup the building blocks for audio and video capabilities
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cocoapods
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;ApplozicAudioVideo is available through &lt;a href="https://cocoapods.org/"&gt;CocoaPods&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;To install it, setup your Podfile located at /ios/Podfile and add below pod dependency:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;source 'https://github.com/CocoaPods/Specs'
use_frameworks!  # Required to add 
platform :ios, '11.0' # Required to add

target 'TARGET_NAME' do
    pod 'ApplozicAudioVideo'  # Required to add 
end&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;&lt;li&gt;Navigate to YourApp/ios directory from terminal and run the below command:&lt;/li&gt;&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;pod install&lt;/code&gt;&lt;/pre&gt;

&lt;blockquote&gt;
&lt;p&gt;Note:  If you do not have pod dependency, &lt;a href="https://guides.cocoapods.org/using/getting-started.html" rel="noreferrer noopener"&gt;check out how to get started here.&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;The Audio-Video Call SDK includes our iOS messaging SDK. If you have added the pod 'Applozic' in your Podfile please remove that and replace it with 'ApplozicAudioVideo'.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Add Permissions
&lt;/h3&gt;

&lt;p&gt;Add permissions for Camera, Photo Library, Microphone, Contacts and Location usage.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: We won't be asking the users for these permissions unless they use the respective feature. Due to Apple's requirement, we have to add these permissions if we are using any of their APIs related to Camera, Microphone, etc.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Open &lt;code&gt;Info.plist&lt;/code&gt; from &lt;code&gt;/ios/YOUR_PROJECT_NAME/Info.plist&lt;/code&gt; file and paste these permissions anywhere inside the &lt;code&gt;&amp;lt;dict&amp;gt;&lt;/code&gt; tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;key&amp;gt;NSCameraUsageDescription&amp;lt;/key&amp;gt;
&amp;lt;string&amp;gt;Allow Camera&amp;lt;/string&amp;gt;
&amp;lt;key&amp;gt;NSContactsUsageDescription&amp;lt;/key&amp;gt;
&amp;lt;string&amp;gt;Allow Contacts&amp;lt;/string&amp;gt;
&amp;lt;key&amp;gt;NSLocationWhenInUseUsageDescription&amp;lt;/key&amp;gt;
&amp;lt;string&amp;gt;Allow location sharing!!&amp;lt;/string&amp;gt;
&amp;lt;key&amp;gt;NSMicrophoneUsageDescription&amp;lt;/key&amp;gt;
&amp;lt;string&amp;gt;Allow MicroPhone&amp;lt;/string&amp;gt;
&amp;lt;key&amp;gt;NSPhotoLibraryUsageDescription&amp;lt;/key&amp;gt;
&amp;lt;string&amp;gt;Allow Photos&amp;lt;/string&amp;gt;
&amp;lt;key&amp;gt;NSPhotoLibraryAddUsageDescription&amp;lt;/key&amp;gt;
&amp;lt;string&amp;gt;Allow write access&amp;lt;/string&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup Application ID
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;At this step, you should already have &lt;a rel="noreferrer noopener" href="https://console.applozic.com/signup?product=applozic"&gt;signed up&lt;/a&gt; for Applozic and &lt;a rel="noreferrer noopener" href="https://console.applozic.com/settings/install"&gt;obtained your APP_ID&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the &lt;code&gt;ALChatManager.h&lt;/code&gt; file and replace “applozic-sample-app” with your APP-ID.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#define APPLICATION_ID @"&amp;amp;lt;YOUR_APPLOZIC_APP_ID&amp;gt;"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a rel="noreferrer noopener" href="https://docs.applozic.com/docs/react-native-chat-session"&gt;Once you are at this stage, follow the Applozic documentation&lt;/a&gt; to complete the authentication, set up of user profiles and other such basic building blocks of your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Continue this Tutorial on Applozic Blog!
&lt;/h2&gt;

&lt;p&gt;We have the detailed tutorial with code snippets available on &lt;a href="https://www.applozic.com/blog/"&gt;our blog&lt;/a&gt; for you to continue with your integration and configuration. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.applozic.com/blog/how-to-build-an-ios-app-for-real-time-communication-with-voice-and-video/"&gt;Click here to learn&lt;/a&gt; how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set up Authentication&lt;/li&gt;
&lt;li&gt;Add Audio/Video configuration&lt;/li&gt;
&lt;li&gt;Set up push notifications&lt;/li&gt;
&lt;li&gt;And many other features!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please leave your feedback and doubts in the comments below!&lt;/p&gt;

</description>
      <category>ios</category>
      <category>tutorial</category>
      <category>applozic</category>
      <category>objectivec</category>
    </item>
    <item>
      <title>Set up APNs to deliver instant notifications in your iOS app</title>
      <dc:creator>Anurag Jayaraman</dc:creator>
      <pubDate>Mon, 24 May 2021 13:46:17 +0000</pubDate>
      <link>https://forem.com/applozic/set-up-apns-to-deliver-instant-notifications-in-your-ios-app-218j</link>
      <guid>https://forem.com/applozic/set-up-apns-to-deliver-instant-notifications-in-your-ios-app-218j</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was first published on &lt;a href="https://www.applozic.com/blog/firebase-start-up-your-base-or-fire-up-your-own-servers/"&gt;Applozic Blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;It's 8 pm and you're tired after a long day of work. You want to order in food but you also need to be on video for the marketing call for the next hour. How do you know when the food has been picked up and delivered without surreptitiously checking your iPhone?&lt;/p&gt;

&lt;p&gt;Push Notifications!&lt;/p&gt;

&lt;p&gt;The little ding of your phone that reminds you to check it for the latest notification and satiate your fear of missing out (FOMO) on what's going on with the world - did you know that this technology is possible through a technology called APNs?&lt;/p&gt;

&lt;p&gt;Apple Push Notification Service (APNs) enable you to deliver remote notifications (also known as push notifications) that push small amounts of data to devices that use your app, even when your app isn’t running.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does APNs work?
&lt;/h2&gt;

&lt;p&gt;The delivery of remote notifications involves these key components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your organization's server (known as the provider server)&lt;/li&gt;
&lt;li&gt;Apple Push Notification service (APNs) set up&lt;/li&gt;
&lt;li&gt;The user’s device&lt;/li&gt;
&lt;li&gt;Your app (running on the user’s device)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r1MDeAly--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dsftg8avw7oh9j0iegkp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r1MDeAly--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dsftg8avw7oh9j0iegkp.png" alt="image"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Remote notifications begin with your company’s server. You decide which notifications you want to send to your users, and when to send them. When it’s time to send a notification, you generate a request that contains the notification data and a unique identifier for the user’s device. You then forward your request to APNs, which handles the delivery of the notification to the user’s device. Upon receipt of the notification, the operating system on the user’s device handles any user interactions and delivers the notification to your app.&lt;/p&gt;

&lt;p&gt;You’re responsible for setting up a provider server (or servers) and for configuring your app to handle notifications on the user’s device. Apple manages everything in between, including the presentation of notifications to the user. You must also have an app running on the user’s device that can communicate with your server and provide necessary information.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does APNs provide?
&lt;/h2&gt;

&lt;p&gt;APNs provides a mechanism to ensure your app makes every effort to deliver your notifications from your server, and to deliver them with the best user experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APNs manages an accredited, encrypted, and persistent IP connection to the user’s device.&lt;/li&gt;
&lt;li&gt;APNs allows you to remotely lock/wipe a lost/stolen/compromised device over the air. &lt;/li&gt;
&lt;li&gt;APNs can store notifications for a device that’s currently offline. APNs then forwards the stored notifications when the device comes online. &lt;/li&gt;
&lt;li&gt;APNs can combine notifications for the same app and display them at once.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What can you use push notifications for?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Display a short text message, called an alert, that draws attention to something new in your app. &lt;/li&gt;
&lt;li&gt;Play a notification sound. &lt;/li&gt;
&lt;li&gt;Set a badge number on the app’s icon to let the user know there are new items. &lt;/li&gt;
&lt;li&gt;Provide actions the user can take without opening the app. &lt;/li&gt;
&lt;li&gt;Show a media attachment&lt;/li&gt;
&lt;li&gt;And many more such actions!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that we have a clear understanding of how we can use APNs in our applications, let's learn about how we can set them up!&lt;/p&gt;

&lt;h2&gt;
  
  
  Set up APNs in your chat app
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we will be learning how to set up APNs in your application and integrating the remote notification service. For the purpose of this tutorial, we will be using &lt;a rel="noreferrer noopener" href="https://www.applozic.com/"&gt;Applozic's&lt;/a&gt; iOS SDK offering. Please follow our &lt;a rel="noreferrer noopener" href="https://github.com/AppLozic/Applozic-iOS-SDK#readme"&gt;documentation at GitHub&lt;/a&gt; and complete the first two steps in your integration process, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a rel="noreferrer noopener" href="https://github.com/AppLozic/Applozic-iOS-SDK#1-setup"&gt;Initial Setup&lt;/a&gt; and adding &lt;a rel="noreferrer noopener" href="https://github.com/AppLozic/Applozic-iOS-SDK#frameworks"&gt;frameworks&lt;/a&gt; and &lt;a rel="noreferrer noopener" href="https://github.com/AppLozic/Applozic-iOS-SDK#add-permissions"&gt;permissions&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a rel="noreferrer noopener" href="https://github.com/AppLozic/Applozic-iOS-SDK#2-registerlogin-the-user"&gt;Registering a user&lt;/a&gt; for your application &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Configure your app and register it with the APNs
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Creating APNs certificates
&lt;/h4&gt;

&lt;p&gt;For Apple to send push notifications to user devices, you need to create an APNs certificate in your Apple developer account.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Visit this &lt;a rel="noreferrer noopener" href="https://developer.apple.com/account/resources/certificates/add"&gt;link&lt;/a&gt;, to create Apple Push Notification service SSL (Sandbox) i.e development certificate.&lt;/li&gt;
&lt;li&gt;Visit this &lt;a rel="noreferrer noopener" href="https://developer.apple.com/account/resources/certificates/add"&gt;link&lt;/a&gt;, to create Apple Push Notification service SSL (Sandbox &amp;amp; Production), i.e, distribution certificate.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Supported format for APNs certificate is .p12&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once the certificates are created, you can download them and export the .p12 files with the password for development and distribution certificate using&lt;a rel="noreferrer noopener" href="https://support.apple.com/en-in/guide/keychain-access/kyca1085/mac"&gt;&lt;strong&gt;Keychain Access in Mac&lt;/strong&gt;.&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Upload APNs Certificates
&lt;/h4&gt;

&lt;p&gt;Go to the &lt;a rel="noreferrer noopener" href="https://console.applozic.com/settings/pushnotification"&gt;Applozic console push notification section&lt;/a&gt; to upload the APNs development and distribution certificates. The following screenshot is what will be visible on the console for you:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://raw.githubusercontent.com/AppLozic/Applozic-iOS-Audio-Video-SDK/main/Images/apns-certificate-upload.png" rel="noreferrer noopener"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yr_lpjj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/AppLozic/Applozic-iOS-Audio-Video-SDK/main/Images/apns-certificate-upload.png" alt="apns certificate upload in applozic console" title="apns-certificate-upload"&gt;&lt;/a&gt;Push Notification screen in Console Dashboard&lt;/p&gt;

&lt;h4&gt;
  
  
  Adding Capabilities to Your App
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;On the Xcode project’s Signing &amp;amp; Capabilities tab, Click (+ Capability) to add “Push Notifications” &lt;/li&gt;
&lt;li&gt;Next Click (+ Capability) to add "Background modes" enable these options from Background modes:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Background fetch &lt;/li&gt;
&lt;li&gt;Remote notifications &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After adding these capabilities, your screen should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/AppLozic/Applozic-iOS-SDK/blob/master/images/xcode-capability.png" rel="noreferrer noopener"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J1-rEMYv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/AppLozic/Applozic-iOS-SDK/raw/master/images/xcode-capability.png" alt="xcode-capability"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Configure the push notification in the Appdelegate file of your project.
&lt;/h4&gt;

&lt;p&gt;Add the below imports in the Appdelegate file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#import &amp;lt;Applozic/Applozic.h&amp;gt;
#import &amp;lt;UserNotifications/UserNotifications.h&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Handling app launch on notification click and register remote notification for APNs
&lt;/h4&gt;

&lt;p&gt;Add the following code in AppDelegate.m class, this function will be called after the app launch to register for push notifications.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// UNUserNotificationCenterDelegate are required for APNs call backs please add this delegate to your AppDelegate file 
@interface AppDelegate () &amp;lt;UNUserNotificationCenterDelegate&amp;gt;

@end


// didFinishLaunchingWithOptions method of your app

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // checks whether app version is updated/changed then makes server call setting VERSION_CODE
    [ALRegisterUserClientService isAppUpdated];

    // Register APNs and Push kit
    [self registerForNotification];

    // Register for Applozic notification tap actions and network change notifications
    ALAppLocalNotifications *localNotification = [ALAppLocalNotifications appLocalNotificationHandler];
    [localNotification dataConnectionNotificationHandler];

    ALPushNotificationHandler *pushNotificationHandler = [ALPushNotificationHandler shared];
    [pushNotificationHandler dataConnectionNotificationHandler];

    // Override point for customization after application launch.
    NSLog(@"launchOptions: %@", launchOptions);
    if (launchOptions != nil) {
        NSDictionary *dictionary = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
        if (dictionary != nil) {
            NSLog(@"Launched from push notification: %@", dictionary);
            ALPushNotificationService *pushNotificationService = [[ALPushNotificationService alloc] init];
            BOOL applozicProcessed = [pushNotificationService processPushNotification:dictionary updateUI:[NSNumber numberWithInt:APP_STATE_INACTIVE]];

            //IF not a appplozic notification, process it
            if (!applozicProcessed) {
                //Note: notification for app
            }
        }
    }

    return YES;
}

// Register APNs

-(void)registerForNotification
{
    UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
    center.delegate = self;
    [center requestAuthorizationWithOptions:(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge) completionHandler:^(BOOL granted, NSError * _Nullable error)
     {
        if(!error)
        {
            dispatch_async(dispatch_get_main_queue(), ^ {
                [[UIApplication sharedApplication] registerForRemoteNotifications];  // required to get the app to do anything at all about push notifications
                NSLog(@"Push registration success." );
            });
        }
        else
        {
            NSLog(@"Push registration FAILED" );
            NSLog(@"ERROR: %@ - %@", error.localizedFailureReason, error.localizedDescription );
            NSLog(@"SUGGESTIONS: %@ - %@", error.localizedRecoveryOptions, error.localizedRecoverySuggestion );
        }
    }];
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Sending an APNs device token to Applozic server
&lt;/h4&gt;

&lt;p&gt;Add the below code in your Appdelegate file. If any of these methods already exist then you can copy-paste the relevant code from the below methods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// APNs device token sending to Applozic

- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)
deviceToken {

    const unsigned *tokenBytes = [deviceToken bytes];
    NSString *hexToken = [NSString stringWithFormat:@"%08x%08x%08x%08x%08x%08x%08x%08x",
                          ntohl(tokenBytes[0]), ntohl(tokenBytes[1]), ntohl(tokenBytes[2]),
                          ntohl(tokenBytes[3]), ntohl(tokenBytes[4]), ntohl(tokenBytes[5]),
                          ntohl(tokenBytes[6]), ntohl(tokenBytes[7])];

    NSString *apnDeviceToken = hexToken;
    NSLog(@"apnDeviceToken: %@", hexToken);

    if (![[ALUserDefaultsHandler getApnDeviceToken] isEqualToString:apnDeviceToken]) {
        ALRegisterUserClientService *registerUserClientService = [[ALRegisterUserClientService alloc] init];
        [registerUserClientService updateApnDeviceTokenWithCompletion
         :apnDeviceToken withCompletion:^(ALRegistrationResponse
                                          *rResponse, NSError *error) {

            if (error) {
                NSLog(@"%@",error);
                return;
            }
            NSLog(@"Registration response%@", rResponse);
        }];
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Receiving push notification
&lt;/h4&gt;

&lt;p&gt;Once your app receives notification, pass it to the Applozic handler for chat notification processing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// UNUserNotificationCenter delegates for chat
- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification*)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler {
    ALPushNotificationService *pushNotificationService = [[ALPushNotificationService                                                    alloc] init];
    NSDictionary *userInfo = notification.request.content.userInfo;
    NSLog(@"APNS willPresentNotification for userInfo: %@", userInfo);

    if ([pushNotificationService isApplozicNotification:userInfo]) {
        [pushNotificationService notificationArrivedToApplication:[UIApplication sharedApplication] withDictionary:userInfo];
        completionHandler(UNNotificationPresentationOptionNone);
        return;
    }
    completionHandler(UNNotificationPresentationOptionAlert|UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound);
}

- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(nonnull UNNotificationResponse* )response withCompletionHandler:(nonnull void (^)(void))completionHandler {


    ALPushNotificationService *pushNotificationService = [[ALPushNotificationService
                                                           alloc] init];
    NSDictionary *userInfo =  response.notification.request.content.userInfo;
    NSLog(@"APNS didReceiveNotificationResponse for userInfo: %@", userInfo);

    if ([pushNotificationService isApplozicNotification:userInfo]) {
        [pushNotificationService notificationArrivedToApplication:[UIApplication sharedApplication] withDictionary:userInfo];
        completionHandler();
        return;
    }
    completionHandler();
}

-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{

    NSLog(@"RECEIVED_NOTIFICATION_WITH_COMPLETION :: %@", userInfo);
    ALPushNotificationService *pushNotificationService = [[ALPushNotificationService alloc] init];
    if ([pushNotificationService isApplozicNotification:userInfo]) {
        [pushNotificationService notificationArrivedToApplication:application withDictionary:userInfo];
        completionHandler(UIBackgroundFetchResultNewData);
        return;
    }
    completionHandler(UIBackgroundFetchResultNewData);
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.

    [[ALDBHandler sharedInstance] saveContext];
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the inactive state; here you can undo any of the changes made on entering the background.

    NSLog(@"APP_ENTER_IN_FOREGROUND");
    [application setApplicationIconBadgeNumber:0];
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We began this article by going over the workings of APNs and how it can be utilized in our applications. We also learnt about what are the requirements in setting up APNs and the different use cases remote notifications provide for an application.&lt;/p&gt;

&lt;p&gt;Next, we utilized Applozic's iOS SDK to configure and register an application with APNs. We also added the remote notification and background fetch capabilities in the app.&lt;/p&gt;

&lt;p&gt;Finally, we went over the code snippets that will enable you to configure the sending and receiving of push notifications in an application.&lt;/p&gt;

&lt;p&gt;As we end this tutorial, you should have a clear understanding of the push notification ecosystem in iOS and leveraging APNs in your applications.&lt;/p&gt;

&lt;p&gt;Please leave your feedback and doubts in the comments below!&lt;/p&gt;

</description>
      <category>ios</category>
      <category>applozic</category>
      <category>apns</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
