<?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>DEV Community: Jarod Smith</title>
    <description>The latest articles on DEV Community by Jarod Smith (@jarodms).</description>
    <link>https://dev.to/jarodms</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%2F367347%2F52b760b1-8c7a-47c2-be0a-30ae584198da.jpeg</url>
      <title>DEV Community: Jarod Smith</title>
      <link>https://dev.to/jarodms</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jarodms"/>
    <language>en</language>
    <item>
      <title>Not able to call REST API on Android, but it works with iOS and Web App</title>
      <dc:creator>Jarod Smith</dc:creator>
      <pubDate>Tue, 20 Oct 2020 14:36:47 +0000</pubDate>
      <link>https://dev.to/jarodms/not-able-to-call-rest-api-on-android-but-it-works-with-ios-and-web-app-3gl2</link>
      <guid>https://dev.to/jarodms/not-able-to-call-rest-api-on-android-but-it-works-with-ios-and-web-app-3gl2</guid>
      <description>&lt;p&gt;During the development of a recent mobile app, I was retrieving data using a rest api. The web app was working fine and displaying the data. When I deployed to the Android device, I was receiving no data and the following error when calling the api:&lt;/p&gt;

&lt;p&gt;Error Code: 0&lt;br&gt;&lt;br&gt;
Message: Http Failure response for [rest api url]&lt;br&gt;&lt;br&gt;
0 Unknown Error&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KmyVXaGI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jarodms.com/wp-content/uploads/2020/10/2020-10-20-09_22_15-Unknown-Error.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KmyVXaGI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jarodms.com/wp-content/uploads/2020/10/2020-10-20-09_22_15-Unknown-Error.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then deployed to my iPhone and everything worked fine. I was pulling the data back fine and displaying the list of items.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pxJBlIDa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jarodms.com/wp-content/uploads/2020/10/iOS-Data-is-displaying-5-576x1024.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pxJBlIDa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jarodms.com/wp-content/uploads/2020/10/iOS-Data-is-displaying-5-576x1024.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I remembered that since this app (which is in beta) was accessing the api using http, not https. I know, I know…it’ll move to https eventually. So that meant I needed to add the following to the android platform entry in the config.xml.&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;edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"&amp;gt;
   &amp;lt;application android:usesCleartextTraffic="true" /&amp;gt;
&amp;lt;/edit-config&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells Android it’s ok to access data over non-secure (cleartext) traffic.&lt;/p&gt;

&lt;p&gt;But…that didn’t work either. That’s weird. Why not? I’ve seen it work just fine in the past, so it was odd.&lt;/p&gt;

&lt;p&gt;Ugh. So what I decided to do was remove the android platform, then re-add it, and do a new android build.&lt;/p&gt;

&lt;p&gt;Whammy! It works now. I still need the edit-config entry, but apparently, there was something wrong/weird with my previous build files.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://www.jarodms.com/2020/10/20/not-able-to-call-rest-api-on-android-but-it-works-with-ios-and-web-app/"&gt;Not able to call REST API on Android, but it works with iOS and Web App&lt;/a&gt; appeared first on &lt;a href="https://www.jarodms.com"&gt;JarodMS&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>uncategorized</category>
    </item>
    <item>
      <title>My Dividend Meter</title>
      <dc:creator>Jarod Smith</dc:creator>
      <pubDate>Thu, 19 Mar 2020 22:31:45 +0000</pubDate>
      <link>https://dev.to/jarodms/my-dividend-meter-4lc9</link>
      <guid>https://dev.to/jarodms/my-dividend-meter-4lc9</guid>
      <description>&lt;p&gt;I recently completed a web app and thought I’d share a little bit more information about it.&lt;/p&gt;

&lt;p&gt;I’ve long been interested in dividend stocks and have used a tool in the past based on an Excel spreadsheet. I’ve turned this into a web app that can be dynamically updated with no need for spreadsheets, macros or manual setup. MVP is setup and working with more features and automation coming soon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v4hwc6i9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://www.jarodms.com/wp-content/uploads/2020/03/my-dividend-meter.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v4hwc6i9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://www.jarodms.com/wp-content/uploads/2020/03/my-dividend-meter.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check it out here: &lt;a href="https://mydividendmeter.com/"&gt;https://mydividendmeter.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This app was built with Angular, Firebase, Google Cloud Functions, and a MongoDB database.&lt;/p&gt;

&lt;p&gt;The stock data is being retrieved from IEX Cloud’s freemium API at  &lt;a href="https://iexcloud.io/"&gt;https://iexcloud.io/&lt;/a&gt;. this is a great service and allows beginners to get started with some basic API’s. If I get more traffic, I will definitely need to upgrade.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Backend – Firebase
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Firebase Authentication – allows for users to signup with either their Google account or an email address.&lt;/li&gt;
&lt;li&gt;Cloud Firestore – Stores the users preferences and stock choices. Stock prices aren’t stored here, just the portfolio of the user in Collection. This includes Ticker Symbol and Stock Count. User Info includes things like Income Goal and subscription type.&lt;/li&gt;
&lt;li&gt;Google Cloud Functions – Used to retrieve custom stock data information from the MongoDB.
&lt;em&gt;Note:&lt;/em&gt; This was an interesting part to me that I will hopefully write about in the future. I have a custom build process so that when I use the functions in my &lt;em&gt;local&lt;/em&gt; dev environment, I access a &lt;em&gt;local&lt;/em&gt; MongoDB. When I deploy to GCP, I use the cloud mongoDB Atlas instance. This switch happens automatically with the deploy so I don’t have to manually change any code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Frontend – Angular
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;All pages and the menus are built using Angular. This includes the form input. Ng-Bootstrap is used for styling.&lt;/li&gt;
&lt;li&gt;Custom AuthGuard used to limit access to certain pages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The post &lt;a href="http://www.jarodms.com/2020/03/19/my-dividend-meter/"&gt;My Dividend Meter&lt;/a&gt; appeared first on &lt;a href="http://www.jarodms.com"&gt;JarodMS&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>authguard</category>
      <category>firebase</category>
      <category>googlecloudfunctio</category>
    </item>
    <item>
      <title>LoadingController example showing “Loading…” message</title>
      <dc:creator>Jarod Smith</dc:creator>
      <pubDate>Tue, 26 Nov 2019 15:16:40 +0000</pubDate>
      <link>https://dev.to/jarodms/loadingcontroller-example-showing-loading-message-8jn</link>
      <guid>https://dev.to/jarodms/loadingcontroller-example-showing-loading-message-8jn</guid>
      <description>&lt;p&gt;For longer running operations (e.g., data requests) it might be nice to show the user that you are loading their data or performing a long running action. For this we will use the LoadingController to show a simple message while we are retrieving a list of nearby shows from our service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { LoadingController } from '@ionic/angular';

constructor(private loadingCtrl: LoadingController, 
            private showsService: ShowsService) { }

updateShows() {
    this.loadingCtrl.create({ message: 'Loading shows...' }).
      then((res) =&amp;gt; {
        res.present();
        this.showsService.getShows()
          .subscribe((data: any) =&amp;gt; {
            this.shows = data;
            res.dismiss();
        });
      });
  }

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

&lt;/div&gt;



&lt;p&gt;In your constructor, be sure to inject the LoadingController.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: The method &lt;strong&gt;updateShows()&lt;/strong&gt; is actually called during a different point in my code, but where/when is not important to this example.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If the service call is really fast then the “Loading” message may not appear at all. When it does show up, here is what it looks like.&lt;/p&gt;

&lt;a href="http://www.jarodms.com/wp-content/uploads/2019/11/Loading-Shows.mp4"&gt;http://www.jarodms.com/wp-content/uploads/2019/11/Loading-Shows.mp4&lt;/a&gt;

&lt;p&gt;This is a really basic example. There are a few options for setting the loading indicator and more information for that can be found in the Ionic documentation: &lt;a href="https://ionicframework.com/docs/api/loading"&gt;https://ionicframework.com/docs/api/loading&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The post &lt;a href="http://www.jarodms.com/2019/11/26/loadingcontroller-example-showing-loading-message/"&gt;LoadingController example showing “Loading…” message&lt;/a&gt; appeared first on &lt;a href="http://www.jarodms.com"&gt;JarodMS&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ionic</category>
    </item>
    <item>
      <title>Example Angular 8 with NgRx and Redux DevTools</title>
      <dc:creator>Jarod Smith</dc:creator>
      <pubDate>Thu, 03 Oct 2019 04:57:29 +0000</pubDate>
      <link>https://dev.to/jarodms/example-angular-8-with-ngrx-and-redux-devtools-18h3</link>
      <guid>https://dev.to/jarodms/example-angular-8-with-ngrx-and-redux-devtools-18h3</guid>
      <description>&lt;p&gt;This was a fun little example and can be used as a template to get started with other projects using Angular 8, NgRx, and Ionic 4.&lt;/p&gt;

&lt;p&gt;Here’s what is used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Angular 8&lt;/li&gt;
&lt;li&gt;NgRx Store 8.3.0&lt;/li&gt;
&lt;li&gt;NgRx Store DevTools 8.3.0&lt;/li&gt;
&lt;li&gt;For fun, Ionic 4.7.1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ybcByDvlEo4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
Redux DevTools in action



&lt;p&gt;To build and run this example, clone the GitHub repo here: &lt;a href="https://github.com/jarodms/ionic4-angular8-ngrx-example"&gt;https://github.com/jarodms/ionic4-angular8-ngrx-example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will also need to install the &lt;a href="https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd"&gt;Redux DevTools Chrome extension&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://alligator.io/angular/ngrx-store-redux-devtools/"&gt;https://alligator.io/angular/ngrx-store-redux-devtools/&lt;/a&gt; for the Redux DevTools setup info.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="http://www.jarodms.com/2019/10/02/example-angular-8-with-ngrx-and-redux-devtools/"&gt;Example Angular 8 with NgRx and Redux DevTools&lt;/a&gt; appeared first on &lt;a href="http://www.jarodms.com"&gt;JarodMS&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>angular</category>
    </item>
  </channel>
</rss>
