<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jason Pribble on Medium]]></title>
        <description><![CDATA[Stories by Jason Pribble on Medium]]></description>
        <link>https://medium.com/@pribble88?source=rss-b6e1d687cbe8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*b1o0A7UFSrPQzC3W.</url>
            <title>Stories by Jason Pribble on Medium</title>
            <link>https://medium.com/@pribble88?source=rss-b6e1d687cbe8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:31:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pribble88/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to get an Android Device Nickname]]></title>
            <link>https://medium.com/capital-one-tech/how-to-get-an-android-device-nickname-d5eab12f4ced?source=rss-b6e1d687cbe8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5eab12f4ced</guid>
            <category><![CDATA[android-devices]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Jason Pribble]]></dc:creator>
            <pubDate>Wed, 08 May 2019 18:43:03 GMT</pubDate>
            <atom:updated>2019-05-08T18:43:45.173Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Comparison of the Top 5 Methods on Popular Android Devices</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JmYtngM7EWTkI3_i" /></figure><h3>Background</h3><p>On most Android devices, users have the option to set a custom device nickname to make it easier for them to identity their device. When showing a user a list of their devices, we want their custom device name to be displayed instead of the factory default value if it’s available.</p><h3>Research</h3><p>I searched the web and found several different methods to read the user specified device nickname on Android:</p><ol><li><a href="https://developer.android.com/reference/android/provider/Settings.System.html#getString(android.content.ContentResolver,%20java.lang.String)">Settings.System.getString(getContentResolver(), “bluetooth_name”);</a></li><li><a href="https://developer.android.com/reference/android/provider/Settings.Secure.html#getString(android.content.ContentResolver,%20java.lang.String)">Settings.Secure.getString(getContentResolver(), “bluetooth_name”);</a></li><li><a href="https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getName()">BluetoothAdapter.getDefaultAdapter().getName();</a></li><li><a href="https://developer.android.com/reference/android/provider/Settings.System.html#getString(android.content.ContentResolver,%20java.lang.String)">Settings.System.getString(getContentResolver(), “device_name”);</a></li><li><a href="https://developer.android.com/reference/android/provider/Settings.Secure.html#getString(android.content.ContentResolver,%20java.lang.String)">Settings.Secure.getString(getContentResolver(), “lock_screen_owner_info”);</a></li></ol><p><em>Note: #3 requires Bluetooth permission.</em></p><p>Sources:</p><ul><li><a href="https://stackoverflow.com/questions/16704597/how-do-you-get-the-user-defined-device-name-in-android">Stack Overflow — How do you get the user defined “Device Name” in android?</a></li><li><a href="https://stackoverflow.com/questions/38393849/how-to-fetch-device-name-not-build-model-from-android-programatically">Stack Overflow — How to fetch Device Name (NOT Build.MODEL) from Android programmatically?</a></li><li><a href="https://forums.xamarin.com/discussion/91705/device-name-not-make-model-or-manufacturer-but-the-user-assigned-name-of-the-device">Xamarin Forums — Device Name — Not make, model or manufacturer. But the user assigned name of the device.</a></li></ul><h3>Results</h3><p>But how do they perform on various popular Android devices? The # columns in the table below refer to the methods used to access the device nickname referenced in the ‘Research’ section above. A green check indicates that we were able to successfully read the user’s custom device nickname.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*dLQ6b5DnGN1K5KP1pXZM9w.png" /></figure><h3>Conclusion</h3><p>There is no standardized Android API to read the user specified device nickname and not all Android devices support a custom nickname. There are ways to read this data but none work on all Android devices.</p><p>Although we didn’t find a consistent way to access the user specified device nickname, there are libraries available like <a href="https://github.com/jaredrummler/AndroidDeviceNames">AndroidDeviceNames</a> that can provide a <em>more</em> readable device name than the factory set value (e.g. “sailfish”). For example, it can provide “Samsung S8+” which a user is more likely to recognize than the codename “dream2qltecan” or model number “SM-G955W”.</p><p><em>DISCLOSURE STATEMENT: These opinions are those of the author. Unless noted otherwise in this post, Capital One is not affiliated with, nor is it endorsed by, any of the companies mentioned. All trademarks and other intellectual property used or displayed are the ownership of their respective owners. This article is © 2019 Capital One.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5eab12f4ced" width="1" height="1" alt=""><hr><p><a href="https://medium.com/capital-one-tech/how-to-get-an-android-device-nickname-d5eab12f4ced">How to get an Android Device Nickname</a> was originally published in <a href="https://medium.com/capital-one-tech">Capital One Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to get an Android Device Nickname]]></title>
            <link>https://medium.com/@pribble88/how-to-get-an-android-device-nickname-4b4700b3068c?source=rss-b6e1d687cbe8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b4700b3068c</guid>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Jason Pribble]]></dc:creator>
            <pubDate>Mon, 06 May 2019 18:11:20 GMT</pubDate>
            <atom:updated>2019-05-07T15:18:17.988Z</atom:updated>
            <content:encoded><![CDATA[<p>A Comparison of the Top 5 Methods on Popular Android Devices</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JmYtngM7EWTkI3_i" /></figure><h3>Background</h3><p>On most Android devices, users have the option to set a custom device nickname to make it easier for them to identity their device. When showing a user a list of their devices, we want their custom device name to be displayed instead of the factory default value if it’s available.</p><h3>Research</h3><p>I searched the web and found several different methods to read the user specified device nickname on Android:</p><ol><li><a href="https://developer.android.com/reference/android/provider/Settings.System.html#getString(android.content.ContentResolver,%20java.lang.String)">Settings.System.getString(getContentResolver(), “bluetooth_name”);</a></li><li><a href="https://developer.android.com/reference/android/provider/Settings.Secure.html#getString(android.content.ContentResolver,%20java.lang.String)">Settings.Secure.getString(getContentResolver(), “bluetooth_name”);</a></li><li><a href="https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getName()">BluetoothAdapter.getDefaultAdapter().getName();</a></li><li><a href="https://developer.android.com/reference/android/provider/Settings.System.html#getString(android.content.ContentResolver,%20java.lang.String)">Settings.System.getString(getContentResolver(), “device_name”);</a></li><li><a href="https://developer.android.com/reference/android/provider/Settings.Secure.html#getString(android.content.ContentResolver,%20java.lang.String)">Settings.Secure.getString(getContentResolver(), “lock_screen_owner_info”);</a></li></ol><p><em>Note: #3 requires Bluetooth permission.</em></p><p>Sources:</p><ul><li><a href="https://stackoverflow.com/questions/16704597/how-do-you-get-the-user-defined-device-name-in-android">Stack Overflow — How do you get the user defined “Device Name” in android?</a></li><li><a href="https://stackoverflow.com/questions/38393849/how-to-fetch-device-name-not-build-model-from-android-programatically">Stack Overflow — How to fetch Device Name (NOT Build.MODEL) from Android programmatically?</a></li><li><a href="https://forums.xamarin.com/discussion/91705/device-name-not-make-model-or-manufacturer-but-the-user-assigned-name-of-the-device">Xamarin Forums — Device Name — Not make, model or manufacturer. But the user assigned name of the device.</a></li></ul><h3>Results</h3><p>But how do they perform on various popular Android devices? The # columns in the table below refer to the methods used to access the device nickname referenced in the ‘Research’ section above. A green check indicates that we were able to successfully read the user’s custom device nickname.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*dLQ6b5DnGN1K5KP1pXZM9w.png" /></figure><h3>Conclusion</h3><p>There is no standardized Android API to read the user specified device nickname and not all Android devices support a custom nickname. There are ways to read this data but none work on all Android devices.</p><p>Although we didn’t find a consistent way to access the user specified device nickname, there are libraries available like <a href="https://github.com/jaredrummler/AndroidDeviceNames">AndroidDeviceNames</a> that can provide a <em>more</em> readable device name than the factory set value (e.g. “sailfish”). For example, it can provide “Samsung S8+” which a user is more likely to recognize than the codename “dream2qltecan” or model number “SM-G955W”.</p><p><em>DISCLOSURE STATEMENT: These opinions are those of the author. Unless noted otherwise in this post, Capital One is not affiliated with, nor is it endorsed by, any of the companies mentioned. All trademarks and other intellectual property used or displayed are the ownership of their respective owners. This article is © 2019 Capital One.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b4700b3068c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Camera Library Comparison]]></title>
            <link>https://medium.com/@pribble88/android-camera-library-comparison-3845cb19ca2?source=rss-b6e1d687cbe8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3845cb19ca2</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[cameras]]></category>
            <category><![CDATA[libraries]]></category>
            <dc:creator><![CDATA[Jason Pribble]]></dc:creator>
            <pubDate>Tue, 28 Nov 2017 15:23:41 GMT</pubDate>
            <atom:updated>2017-11-30T14:13:50.397Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Fotoapparat vs. CameraKit</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*PMbojgjK4wp33IAv6JBkaQ.png" /></figure><h3>Intro</h3><p>Android camera APIs can be notoriously difficult to use but luckily several open source camera libraries have been created to help ease development pains. After evaluating seventeen different camera libraries, I’ve selected two of my personal favorites for this comparison: <a href="https://github.com/Fotoapparat/Fotoapparat">Fotoapparat</a> and <a href="https://github.com/wonderkiln/CameraKit-Android">CameraKit</a>. We’ll evaluate them head-to-head to compare their features, performance, stability, configurability, and more.</p><p>Before we dive into their differences, let’s take a look at some of their similarities.</p><ul><li>Both libraries were created within the last year and are under active development with good community support and documentation.</li><li>Both provide camera view objects that are not dependent on custom Activity/Fragments which allows for greater flexibility and customization.</li><li>Although Google has deprecated the Camera1 API, both libraries favor it over the newer Camera2 API due to its simplicity and ease of use.</li><li>They both contain some of level of code support for Camera2 but both libraries default to use Camera1 on all API levels.</li><li>Both libraries are recommended by <a href="https://github.com/commonsguy">Mark Murphy</a> as alternatives to his excellent, but now deprecated <a href="https://github.com/commonsguy/cwac-camera">CWAC-Camera</a> and <a href="https://github.com/commonsguy/cwac-cam2">CWAC-Cam2</a> libraries.</li></ul><h3>Overview</h3><h4>Fotoapparat</h4><ul><li>Created by <a href="https://github.com/dmitry-zaitsev">Dmitry Zaytsev</a> and <a href="https://github.com/Diolor">Dionysis Lorentzos</a> in March 2017</li><li>Min API: 14</li><li>License: Apache 2.0</li><li>Version tested: 1.4.1</li></ul><h4>CameraKit</h4><ul><li>Created by <a href="http://www.wonderkiln.com/">Wonderkiln</a> in November 2016</li><li>Min API: 15</li><li>License: MIT</li><li>Version tested: 0.12.0</li></ul><h3>Features</h3><p>Lets take a look at the features each library includes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*YWFsb-y-aQa2NA4RonspZw.png" /></figure><p><strong><em>Notes:</em></strong></p><ol><li><em>Fotoapparat has </em><a href="https://github.com/Fotoapparat/Fotoapparat/pull/120"><em>an open PR</em></a><em> to add Touch Focus support.</em></li><li><em>CameraKit has </em><a href="https://github.com/wonderkiln/CameraKit-Android/issues/176"><em>an open issue</em></a><em> tracking adding Frame Processor support.</em></li><li><em>Fotoapparat is </em><a href="https://github.com/Fotoapparat/Fotoapparat/issues/7"><em>considering</em></a><em> adding video support.</em></li></ol><h3>Configurability</h3><p>Both libraries allow for simple settings such as focus, flash, and camera front/back selection to be changed dynamically. However, they differ in how much configuration they allow beyond that.</p><p>CameraKit prefers ease of use over customization. It automatically selects the camera and preview resolutions for you and automatically crops the preview frames to fit in the space available.</p><p>Conversely, Fotoapparat favors customization and provides clever APIs that expose the device’s capabilities and allow them to be configured however you desire. In addition to being able to set specific resolutions, you can also configure the sensor’s sensitivity (ISO) and the frame processor’s FPS setting. The APIs provide filters and selectors to help you dynamically select ideal settings. For example, it allows for advanced logic such as:</p><blockquote>Select the largest 16:9 resolution. If there are none available, then select the largest 4:3 resolution.</blockquote><p>The code to implement that is very simple and looks like this:</p><pre>builder.photoSize(<br>  firstAvailable(<br>    wideRatio(biggestSize()), <br>    standardRatio(biggestSize())<br>  )<br>)</pre><h3>Performance</h3><p>CameraKit claims to be <em>“extremely performant”</em> and has optimized its bitmap processing code by moving it into native code. In this section we’ll compare each library’s capture speed to see if CameraKit’s native code gives it an advantage over Fotoapparat.</p><p>First, we’ll compare the capture speed of taking full resolution (4032x2268) images and receiving the output as a byte array with rotation correction.</p><p><em>Note: All data below was captured on a Samsung Galaxy S8 and measurements were averaged over ten runs.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*56Im-q0oSDLdEXE1H61_TQ.png" /><figcaption><strong>Fotoapparat averaged 104ms (7%) quicker</strong></figcaption></figure><p>Both libraries also support a quick capture mode that captures a lower resolution image from the preview stream. CameraKit calls this mode “Still” capture and Fotoapparat supports this via its frame processor. Let’s look at how the capture speed compares using the quick capture mode in each library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*zm2c5lYTdrTFH0_o-m-XnA.png" /><figcaption><strong>Fotoapparat averaged 131ms (27%) quicker</strong></figcaption></figure><p>Fotoapparat supports an additional option which allows images to be saved directly to a file instead of receiving them as a byte array. This option can be applied to both standard capture mode and quick capture mode. Since CameraKit doesn’t support this option, we’ll compare how Fotoapparat’s ‘Save to File’ option affects performance of its capture modes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*XTjUaMLZym4y6CF0WBXXJQ.png" /><figcaption><strong>Saving to a file is 4x quicker than receiving the image as a byte array</strong></figcaption></figure><p>The main reason saving to a file is quicker is because the image’s orientation information is written to the file’s EXIF data which means the image doesn’t have to be rotated programmatically.</p><h3>Stability</h3><p>To test stability, both libraries’ sample apps were tested across a variety of devices ranging from Android 4.1.1 to 7.0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*XHKXtruDh9nnslSX0oVbFQ.png" /><figcaption>✓ == successful image capture; ✘ == fatal crash</figcaption></figure><p>Fotoapparat was crash-free and was able to successfully capture images on all devices tested. CameraKit crashed on 4 of 12 devices due to two distinct issues.</p><ol><li>Devices #9 and #10 crashed due to a NullPointerException when the capture button was clicked because the library returned a null byte array for the image. Issue is tracked <a href="https://github.com/wonderkiln/CameraKit-Android/issues/240">here</a>.</li><li>Devices #11 and #12 crashed due to an UnsatisfiedLinkError while trying to load native libraries needed for bitmap processing. This issue appears to affect devices running Android 4.2 and older. Issue is tracked <a href="https://github.com/wonderkiln/CameraKit-Android/issues/256">here</a>.</li></ol><h3>Size</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*DhX39MyIXQgb-Y5nZwh9Bw.png" /></figure><p>CameraKit is significantly larger than Fotoapparat due to its use of native code. If size is a concern and you don’t need support for all architectures included (<em>hint: you don’t</em>), you can reduce CameraKit’s size by using NDK abiFilters in your build.gradle file to only include the architectures that your project needs. For example, including the filter below which only includes armeabi-v7a and x86 reduces CameraKit’s size by 73% (from 1.5MB down to 0.4MB).</p><pre>android {<br>  ...<br>  defaultConfig {<br>    ...<br>    <strong>ndk {<br>      abiFilters &quot;armeabi-v7a&quot;, &quot;x86&quot;<br>    }  </strong><br>  }<br>}</pre><p>See <a href="https://android.jlelse.eu/controlling-apk-size-when-using-native-libraries-45c6c0e5b70a">Controlling APK Size When Using Native Libraries</a> for more information.</p><h3>Future Plans</h3><p>CameraKit follows a monthly release schedule and has numerous improvements and new features coming in their <a href="https://github.com/wonderkiln/CameraKit-Android/milestone/9">next release v0.13.0</a>. Here’s a sneak peek of their plans for CameraKit’s v1.0.0 release scheduled for January 2018:</p><ul><li>Improved reliability and stability</li><li>More customization</li><li>Natural Language Processing text recognition</li><li>Pre-processing engine allowing for better filter support, on-face mapping of VFX, and more</li><li>Custom object tracking support</li><li><a href="https://developers.google.com/ar/reference/">ARCore</a> Integration</li></ul><h3>Summary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*T5Sy1tgZmXy7IBzau02aBA.png" /></figure><p>Based on the current versions, as long as you don’t need video support, <a href="https://github.com/Fotoapparat/Fotoapparat">Fotoapparat</a> features more capabilities, is more configurable, has a quicker capture, is more stable, and is smaller sized. If you do need video in your app, check out <a href="https://github.com/wonderkiln/CameraKit-Android">CameraKit</a>’s video feature.</p><p>Both libraries have a great community that are actively developing new features, so visit their repos to view their development progress or contribute to their roadmap.</p><p><em>DISCLOSURE STATEMENT: These opinions are those of the author. Unless noted otherwise in this post, Capital One is not affiliated with, nor is it endorsed by, any of the companies mentioned. All trademarks and other intellectual property used or displayed are the ownership of their respective owners. This article is © 2017 Capital One.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3845cb19ca2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>