<?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: Shubhkirti Sharma</title>
    <description>The latest articles on DEV Community by Shubhkirti Sharma (@shubhkirtisharma).</description>
    <link>https://dev.to/shubhkirtisharma</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%2F184222%2F05b5502d-ab48-4cfc-9494-3e097bc33424.jpeg</url>
      <title>DEV Community: Shubhkirti Sharma</title>
      <link>https://dev.to/shubhkirtisharma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shubhkirtisharma"/>
    <language>en</language>
    <item>
      <title>Building Serverless or Debug APK for React Native apps</title>
      <dc:creator>Shubhkirti Sharma</dc:creator>
      <pubDate>Fri, 21 Jun 2019 22:07:08 +0000</pubDate>
      <link>https://dev.to/shubhkirtisharma/building-serverless-or-debug-apk-for-react-native-apps-356m</link>
      <guid>https://dev.to/shubhkirtisharma/building-serverless-or-debug-apk-for-react-native-apps-356m</guid>
      <description>&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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2Awyxuq21keffc5b0d_lMkUw.jpeg" 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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2Awyxuq21keffc5b0d_lMkUw.jpeg" alt="Photo by [Artem Sapegin](https://unsplash.com/photos/ZMraoOybTLQ?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText) on [Unsplash](https://unsplash.com/search/photos/react-native?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText)"&gt;&lt;/a&gt;&lt;br&gt;
Photo by &lt;a href="https://unsplash.com/photos/ZMraoOybTLQ?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Artem Sapegin&lt;/a&gt; on &lt;a href="https://unsplash.com/search/photos/react-native?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I have been working on React Native for a long time, now and no one actually asked me this till I actually asked myself, “So every time, I have to create a signed APK to test it on another device?”. And as usual, I started googling but came up with a lot of results but none of them actually worked for all the apps that I created or worked with. Eventually, I came up with a solution to build a complete, working serverless APK that runs without the &lt;code&gt;npm&lt;/code&gt; packager.&lt;/p&gt;

&lt;p&gt;Basically, the process is very easy. Open a terminal/command prompt inside the root directory of your project and run the following commands:&lt;/p&gt;

&lt;p&gt;1.  Start the node packaging bundler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2. When the terminal shows: “Loading dependency graphs….”, open a new terminal in the same directory and now run the following to create a new directory inside the app to store the assets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; android/app/src/main/assets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3. Use react-native’s bundle to bundle the assets in the directory created above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;react-native bundle &lt;span class="nt"&gt;--platform&lt;/span&gt; android &lt;span class="nt"&gt;--dev&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt; &lt;span class="nt"&gt;--entry-file&lt;/span&gt; index.js &lt;span class="nt"&gt;--bundle-output&lt;/span&gt; android/app/src/main/assets/index.android.bundle &lt;span class="nt"&gt;--assets-dest&lt;/span&gt; android/app/src/main/res
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4. Curl the .js files created to the index.android.bundle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s2"&gt;"http://localhost:8081/index.bundle?platform=android"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s2"&gt;"android/app/src/main/assets/index.android.bundle"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5. Change to &lt;em&gt;/android&lt;/em&gt; directory and run &lt;em&gt;gradlew&lt;/em&gt; to build the APK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;android &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; ./gradlew clean assembleDebug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Well, that’s it. Easy, peasy! After everything is done and it shows “Build successful”, your APK will be present in the folder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&amp;lt;project&amp;gt;/android/app/build/outputs/apk/debug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you have some suggestions, comment below or give a clap!&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>android</category>
      <category>node</category>
      <category>npm</category>
    </item>
    <item>
      <title>Fix audio errors in Ubuntu 18.04 with alsamixer</title>
      <dc:creator>Shubhkirti Sharma</dc:creator>
      <pubDate>Fri, 21 Jun 2019 21:43:01 +0000</pubDate>
      <link>https://dev.to/shubhkirtisharma/fix-audio-errors-in-ubuntu-18-04-with-alsamixer-729</link>
      <guid>https://dev.to/shubhkirtisharma/fix-audio-errors-in-ubuntu-18-04-with-alsamixer-729</guid>
      <description>&lt;p&gt;Recently I installed Ubuntu 18.04 on my laptop having an SSD and an internal HDD. Soon after fixing a lot of issues, I encountered through this one and thought maybe a lot of people are going through this. So,why not write about it?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslcv2yrpgysy4sqkrasf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslcv2yrpgysy4sqkrasf.png" alt="Sound panel in Ubuntu 18.04" width="800" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sometimes it happens that all the audio controls and volume are full and you stilll don't hear any volume coming out of those speakers. I researched a lot and found out that there maybe a problem with the mixer control. And here is what I found out. I ran &lt;code&gt;alsamixer&lt;/code&gt; in terminal and checked if all the volumes are full or not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7t9mpirgkpxv246ajms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7t9mpirgkpxv246ajms.png" alt="Alsamixer" width="743" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The 'Headphone' volume was mute even though the 'Master' one was full. And this small thing was the issue. The fix? Simple use arrow keys (left/right) to highlight the headphones tab (it turns red as master is in the above photo). Then use arrow keys(up/down) to increase/decrease the volume. Exit the interface by tapping the Esc key.&lt;/p&gt;

&lt;p&gt;You can also use the terminal commands to adjust the volume:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amixer &lt;span class="nb"&gt;set &lt;/span&gt;Headphone 50%

amixer &lt;span class="nb"&gt;set &lt;/span&gt;Master 80%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxnpr36d99m534ueh0sf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxnpr36d99m534ueh0sf.png" alt="Command Line Editing" width="743" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This finally helped me figure out the issue with the audio. If this does not work, let's just discuss what might be happening!&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>linux</category>
      <category>audio</category>
      <category>alsamixer</category>
    </item>
  </channel>
</rss>
