<?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 Polidea on Medium]]></title>
        <description><![CDATA[Stories by Polidea on Medium]]></description>
        <link>https://medium.com/@polidea_15491?source=rss-b9ce5d5b991c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3I3aOZ-ughF9GvAI.png</url>
            <title>Stories by Polidea on Medium</title>
            <link>https://medium.com/@polidea_15491?source=rss-b9ce5d5b991c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 16:41:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@polidea_15491/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[React Native vs. Native App Development — Pros and Cons for Business]]></title>
            <link>https://medium.com/@polidea_15491/react-native-vs-native-app-development-pros-and-cons-for-business-58e7f5d82ad0?source=rss-b9ce5d5b991c------2</link>
            <guid isPermaLink="false">https://medium.com/p/58e7f5d82ad0</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[mobile-apps]]></category>
            <dc:creator><![CDATA[Polidea]]></dc:creator>
            <pubDate>Mon, 23 Apr 2018 13:04:27 GMT</pubDate>
            <atom:updated>2018-04-23T13:04:27.535Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pF5KL3tKIxih8E_z-D8fZA.jpeg" /></figure><h3><strong>React Native</strong> is a framework created by Facebook to enable a smooth and easy cross-platform mobile development. It basically means that you don’t have to create an iOS and Android app separately. All you need is one codebase to develop beautiful apps for both platforms, without compromising on the UX and UI experience.</h3><p>Today, the biggest companies in the world recognize more and more the React Native’s potential for business. What are those benefits? Is React Native the right solution for you? Is it better than the native development? We sat down with our Head of Client Services <a href="https://www.linkedin.com/in/snieradka/">Szymon Nieradka</a> to answer these and more React Native related questions.</p><p><strong>How is React Native different from the native mobile app development and why is it becoming more and more popular?</strong></p><p>The dream of having one framework that will cover all platforms was with the industry for years. Making that dream come true, however, used to be impossible. In fact, we were struggling with doing mobile cross-platform development for many, many years.</p><p>Regarding the web development, you access most of the functions on your laptop using one application — a web browser. Nobody questions HTML’s (to be more precise HTML5, CSS and JS) dominance since it’s a certain standard.</p><p>Mobile development went in a completely different direction. Fifteen years ago no one had an idea how to build an interface in mobile apps. We all remember how Symbian looked, and the differences between iOS and Android in the beginning. Back then it was super hard to prepare one framework that somehow would be useful on all other platforms. There were of course frameworks like Xamarin, PhoneGap and bunch of others that did their best to achieve that goal — but none of them was really good.</p><p>Nowadays, a few things have changed, especially when it comes to the UI. The efficiency of devices has increased and the market fragmentation decreased — there are only two players: Android and iOS. Only four years ago we were creating a mobile banking app for the largest Polish bank for iOS, Android, WindowsPhone, Symbian/Java and Blackberry…</p><p>I believe that React Native is the very first framework that allows us to create a mobile app, which will work both on iOS and Android when we don’t have to compromise on speed, efficiency and their overall look and feel.</p><p><strong>Is React Native better than native?</strong></p><p>There’s no yes or no answer here.</p><p>Last month we’ve started a few new projects. Two of them involve a pure native iOS development and one of them is a React Native project. We were wondering which approach is better for all of them — native or cross-platform development. The answer is: it all depends on the project.</p><p>If the client says, that the only platform they are interested in is iOS, then it doesn’t make sense to make it in React Native. If they are expecting to utilize platform specific features (such as iOS ARKit) then React is still not the best option here.</p><p>So sure, there are cases when we don’t recommend the cross-platform development. However, the fact is, that in around 80% of real business cases React Native can increase the speed of mobile development by 30%, sometimes even 40%. These numbers come from our projects, not from thin air, which is why I’d recommend it for most cases.</p><p>Read the whole interview here: <a href="https://www.polidea.com/blog/react-native-vs-native-app-developmentpros-and-cons-for-business/">https://www.polidea.com/blog/react-native-vs-native-app-developmentpros-and-cons-for-business/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58e7f5d82ad0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RxAndroidBLE — your most powerful tool for Bluetooth Low Energy coding!]]></title>
            <link>https://medium.com/@polidea_15491/rxandroidble-your-most-powerful-tool-for-bluetooth-low-energy-coding-c38eaf6e6d76?source=rss-b9ce5d5b991c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c38eaf6e6d76</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[rxjava]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Polidea]]></dc:creator>
            <pubDate>Mon, 29 Aug 2016 08:16:49 GMT</pubDate>
            <atom:updated>2016-08-29T08:16:49.336Z</atom:updated>
            <content:encoded><![CDATA[<p>RxAndroidBLE — your most powerful tool for Bluetooth Low Energy coding!</p><p>​Some time ago we published here, <a href="https://www.polidea.com/blog/Emberlight_turns_light_bulbs_into_smart_ones/">a tutorial on how to work with Bluetooth Low Energy in Android</a>. As you might have noticed, the whole process required many (many!) asynchronous callbacks, handling different numeric statuses, threading knowledge and more. Because at Polidea, our customer’s products become more and more intelligent and connected it was natural for us to simplify all this code duplication and complexity.</p><p>​So we did it, and here it is! Let us introduce you to our new powerful toy, the <a href="http://polidea.github.io/RxAndroidBle/">RxAndroidBLE</a> library. ​ RxAndroidBle is the painkiller for Android’s Bluetooth Low Energy headaches. It is backed with RxJava, it basically implements complicated APIs as handy reactive observables. Long story short, the library can: ​</p><ul><li>Fancy asynchronous operations support (read, write, notifications)</li><li>Thread management in order to meet Android contracts</li><li>Connection and operation error handling, etc.</li></ul><p>In the following post, we will give you tips to get started with <a href="http://polidea.github.io/RxAndroidBle/">RxAndroidBLE</a> library. ​ ​</p><h3>Including into the project</h3><p>The library is available for your convenience as Maven dependency on <a href="http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.polidea.rxandroidble%22%20AND%20a%3A%22rxandroidble%22">Central</a>. Depending on your build system choice you use either: ​</p><h3>Maven</h3><pre>&lt;dependency&gt; &lt;groupId&gt;com.polidea.rxandroidble&lt;/groupId&gt; &lt;artifactId&gt;rxandroidble&lt;/artifactId&gt; &lt;version&gt;1.0.1&lt;/version&gt; &lt;type&gt;aar&lt;/type&gt; &lt;/dependency&gt;</pre><h3>Gradle</h3><pre>compile &quot;com.polidea.rxandroidble:rxandroidble:1.0.1&quot;</pre><h3>Obtaining the client</h3><p>Your entry point to the library is the RxBleClient class. For connection and operation handling we require that single instance of the client is used per app. It’s a good idea to use some dependency injection like <a href="http://google.github.io/dagger/">Dagger</a> and it’s scoped components but it’s up to you. Simple singletons and <a href="http://developer.android.com/reference/android/app/Application.html">Application</a> based containers are alright to use as well. The client itself can be obtained by simply call to: ​</p><pre>RxBleClient rxBleClient = RxBleClient.create(context)</pre><h3>Finding a device</h3><p>Device discovery is very simple and handy. Scan lifecycle management is linked to the Observable lifecycle. It is safe to subscribe more subscribers to the same observable so you don’t have to worry if there are any scans already taking place, as long as they are initiated through the library. There are some future plans for more advanced filtering. ​ By default there is no filtering but you can pass single or many service UUIDs through the var-arg. You can also safely use your own 128-bit UUIDs as we handle the <a href="https://code.google.com/p/android/issues/detail?id=59490">Android’s bug</a> for you. ​</p><pre>Subscription scanSubscription = rxBleClient.scanBleDevices() .subscribe(rxBleScanResult -&gt; { // Process scan result here. }); // When done, just unsubscribe. scanSubscription.unsubscribe();</pre><p>​ Note: It’s a good idea to chain it with the <a href="https://github.com/trello/RxLifecycle">RxLifecycle</a>. ​</p><h3>Connecting to the device</h3><p>In order to connect you will need the RxBleDevice instance. It can be taken from the scan result or created manually with a mac address of the Bluetooth device. All you need to do is to call establishConnection method and get the RxBleConnection, which is a handle, used to process BLE operations with a connected device. ​</p><pre>String macAddress = &quot;AA:BB:CC:DD:EE:FF&quot;; RxBleDevice rxBleDevice = rxBleClient.getBleDevice(macAddress); ​ Subscription subscription = rxBleDevice.establishConnection(context, false) .subscribe(rxBleConnection -&gt; { }); subscription.unsubscribe();</pre><p>​ By default there can be only one connection call at time. Head to <a href="https://github.com/Polidea/RxAndroidBle/tree/master/sample/src/main/java/com/polidea/rxandroidble/sample">examples</a> and the ConnectionSharingAdapter to learn how to share it. ​</p><h3>Discovering services</h3><p>Although it is not require to do it manually in order to read/write, you can always discover supported services with the following call. ​</p><pre>rxBleDevice.establishConnection(this, false) .flatMap(RxBleConnection::discoverServices) .subscribe(RxBleDeviceServices discoveryResult -&gt; { // Process service discovery result on your own. }); ​</pre><h3>Reading / writing to the device</h3><p>Almost no BLE device is useful if it cannot be interacted. Once you are connected you can operate as presented below: ​</p><h4>Read</h4><pre>device.establishConnection(context, false) .flatMap(rxBleConnection -&gt; rxBleConnection.readCharacteristic(characteristicUUID)) .subscribe(characteristicValue -&gt; { }); ​</pre><h4>Write</h4><pre>device.establishConnection(context, false) .flatMap(rxBleConnection -&gt; rxBleConnection.writeCharacteristic(characteristicUUID, bytesToWrite)) .subscribe(characteristicValue -&gt; { });</pre><h4>Multiple reads</h4><pre>device.establishConnection(context, false) .flatMap(rxBleConnection -&gt; Observable.combineLatest( rxBleConnection.readCharacteristic(firstUUID), rxBleConnection.readCharacteristic(secondUUID), YourModelCombiningTwoValues::new )) .subscribe(model -&gt; { });</pre><h4>Read and write combined</h4><pre>device.establishConnection(context, false) .flatMap(rxBleConnection -&gt; rxBleConnection.readCharacteristic(characteristicUuid) .doOnNext(bytes -&gt; { }) .flatMap(bytes -&gt; rxBleConnection.writeCharacteristic(characteristicUuid, bytesToWrite)) .subscribe(writeBytes -&gt; { });</pre><h3>You can also listen to change notifications</h3><pre>device.establishConnection(context, false) .flatMap(rxBleConnection -&gt; rxBleConnection.setupNotification(characteristicUuid)) .doOnNext(notificationObservable -&gt; { }) .flatMap(notificationObservable -&gt; notificationObservable) .subscribe(bytes -&gt; { }); ​</pre><h3>Closing connection</h3><p>Do not worry about complex connection teardown. Disconnect, closing the GATT is managed for you. The only thing you need to do is to unsubscribe. As simple as that! ​</p><h3>Conclusion</h3><p><a href="https://en.wikipedia.org/wiki/Internet_of_Things">IoT</a> is no longer a future but it is all over the place and Bluetooth programming became our reality. Fortunately thanks to reactive concepts it does not have to be a headache anymore. We believe that open source is a part of our mission so here we are, sharing our battlefield tested knowledge to you. For more great tutorials follow <a href="https://www.polidea.com/blog/">our blog</a> and subscribe to <a href="https://www.polidea.com/subscribe">our newsletter</a>. Do not forget to check <a href="http://polidea.github.io/RxAndroidBle/">the repository on Github</a> as new features are coming!</p><p><em>Originally published at </em><a href="https://www.polidea.com/blog/RxAndroidBLE_the_most_Simple_way_to_code_Bluetooth_Low_Energy_devices/"><em>www.polidea.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c38eaf6e6d76" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>