Home / Companies / PubNub / Blog / July 2019

July 2019 Summaries

16 posts from PubNub

Filter
Month: Year:
Post Summaries Back to Blog
The tutorial provides a comprehensive guide on implementing remote push notifications in a React Native app for both iOS and Android platforms using a PubNub-powered IoT smart button and a Smart Doorbell app. It outlines the necessary steps to set up the environment, including creating an IoT smart button with a push button and an AMKR1000 development board, and completing a Smart Doorbell app that tracks button press events. For iOS, it details the requirements of enrolling in the Apple Developer Program to obtain API keys and configuring push notifications using Xcode, while for Android, it describes using Firebase Cloud Messaging and configuring necessary permissions in AndroidManifest.xml. The guide also explains how to send notifications through PubNub by publishing messages with push notification keys and provides instructions for testing on both physical and virtual devices. Additionally, it offers suggestions for modifying the IoT smart button to trigger push notifications and explores potential uses for mobile push notifications, such as alerting users about delivery locations and promoting offers.
Jul 30, 2019 3,827 words in the original blog post.
PubNub offers software development kits (SDKs) for popular programming languages to expedite the development of real-time applications like chat, IoT, and multiplayer gaming. For those unable to use SDKs or not familiar with programming, PubNub provides an Admin Dashboard that allows users to explore its capabilities without installations, supported by a free plan allowing up to 1 million messages per month. The tutorial covers message passing, chat reactions, presence detection, history retrieval, and serverless functions for customizing message handling both before and after publication. Users can create clients, utilize channels for communication, and experiment with functions such as doubling recipe measurements or sending targeted marketing messages based on chat content. The Admin Dashboard serves as a valuable tool for testing real-time features, encouraging developers to explore PubNub's SDKs and build innovative applications.
Jul 30, 2019 4,820 words in the original blog post.
This tutorial provides a comprehensive guide on building a chat application using PubNub's AngularJS SDK, focusing on implementing features like infinite scroll, message storage, and real-time communication. It emphasizes best practices for structuring an AngularJS app, such as creating a dedicated Message Service to handle message storage and retrieval, and utilizing a UI split into reusable components for improved maintainability and scalability. The guide details the configuration of PubNub for real-time message handling and explores techniques like using AngularJS directives and Lodash for enhanced user experience features such as auto-scrolling and fetching previous messages upon scrolling to the top. It also includes methods to improve performance with techniques like track-by in ng-repeat and throttling scroll events, while providing code snippets and examples to illustrate the implementation process.
Jul 29, 2019 4,982 words in the original blog post.
Functions, previously known as PubNub BLOCKS, enables users to execute code on data traversing the PubNub network, facilitating actions like message transformation, action triggering, and message filtering without the need for personal server infrastructure. This capability allows seamless integration of IBM Watson's cognitive APIs into applications, enhancing them with advanced features such as natural language processing, sentiment analysis, and real-time language translation. Watson's APIs offer powerful tools for developing intelligent applications without the extensive resources typically required for building and training such systems. Several use cases demonstrate the integration's potential, such as chatbots powered by the Assistant API for smart home automation, Discovery for analyzing datasets, Natural Language Understanding for sentiment assessment, Speech-to-Text and Text-to-Speech for interactive applications, and real-time Language Translator support.
Jul 29, 2019 894 words in the original blog post.
The tutorial introduces the development of a feature-rich chat application using AngularJS and PubNub, highlighting PubNub's pub/sub technology for real-time messaging. This first part of a six-part series focuses on sending and receiving messages, utilizing the PubNub AngularJS SDK to integrate PubNub's capabilities into web applications. It guides users through setting up a simple chat room, including installing the SDK using npm, Bower, or the PubNub CDN, and explains how to send and display messages by implementing a sendMessage() function and subscribing to message channels. The tutorial promises further enhancements in subsequent parts, such as message persistence, user lists, typing indicators, authentication, and channel management, all aimed at building a comprehensive AngularJS chat application.
Jul 29, 2019 1,027 words in the original blog post.
This comprehensive four-part tutorial guides users through building a real-time mapping and geolocation tracking application for Android devices using the Google Maps API and PubNub. The tutorial begins by setting up the Android environment and integrating essential components like Google Maps and PubNub for real-time messaging, allowing for the streaming of location data to update maps dynamically. It covers creating necessary API keys, setting up project credentials, and configuring the Android application with required permissions and libraries in the build files. By the end of the series, users will have developed a basic location-tracking app featuring live map markers, device location tracking, and flight paths. The tutorial emphasizes the seamless integration of Google Maps' mapping capabilities with PubNub's real-time communication features, showcasing their combined effectiveness for geolocation applications. Users are encouraged to clone the provided code from a GitHub repository and adapt it within Android Studio, with guidance on running and debugging the application on both emulators and physical devices.
Jul 29, 2019 1,876 words in the original blog post.
Part Two of the tutorial series on building real-time maps with geolocation tracking using the Google Maps API and PubNub focuses on adding and updating map markers on an Android application. The tutorial explains how to configure the necessary settings from Part One and implement the MainActivity file to initialize PubNub for real-time communications and display a live-updating map marker. The LocationSubscribeTabContentFragment is responsible for handling Google Map initialization and subscribing to PubNub message events for location updates, employing a scheduleRandomUpdates() method to simulate location changes. The tutorial also details how the LocationSubscribePnCallback and LocationSubscribeMapAdapter classes are used to manage asynchronous PubNub events and update the UI on the main thread. By the end of this part, the application can plot map markers and update their positions based on real-time data, setting the stage for further enhancements in Part Three, which will cover detecting and plotting the device's location in real time.
Jul 29, 2019 2,241 words in the original blog post.
In the third part of the series on building an Android mobile chat app with PubNub, the focus is on implementing the "Presence" feature, which involves creating a dynamic "buddy list" tab to show users' online statuses. This involves using PubNub's Presence API, an add-on that automatically detects and displays user states, such as online or offline, by leveraging publish/subscribe mechanisms. Key features discussed include the use of presence events like join, leave, and timeout, and the initialization of PubNub with configurations like publish and subscribe keys, UUIDs, and secure connections. The article explains the implementation of an Android Adapter to bridge data between PubNub callbacks and the UI, handling presence events through a subscription callback, and updating the user interface on the UI thread. Advanced features include initializing the user list with the `hereNow()` function, managing user attributes with the `state()` method, and configuring heartbeat settings to manage network connectivity issues. The tutorial concludes with the anticipation of discussing scaling techniques like Channel Groups and Multiplexing in the next part of the series.
Jul 29, 2019 4,819 words in the original blog post.
Part Two of the series on building a mobile chat app for Android with PubNub delves into implementing core chat functionalities using the PubNub API. This segment focuses on setting up message publishing, maintaining an ordered list of received messages, and utilizing a JSON-based structured message format for data extensibility. It outlines the process of initializing PubNub, creating and managing channels, and implementing a chat tab with dynamic message updates in the user interface. The use of adapters to bridge dynamic data with the Android UI is explained, ensuring real-time data display from PubNub channels. The article also touches on managing various app lifecycle events and network connectivity challenges, hinting at future content addressing these topics. Additionally, instructions for running the application in Android Studio are provided, showcasing the app's ability to exchange messages across multiple devices, with plans for expanding features like real-time user presence in subsequent parts of the series.
Jul 29, 2019 5,001 words in the original blog post.
The tutorial delves into implementing an occupancy counter for multiplayer games using the Phaser API and the PubNub JavaScript SDK, specifically focusing on PubNub Presence to track real-time user counts in game channels. By displaying the number of concurrent users at each game level, developers can enhance player engagement by encouraging players to advance when they see friends on subsequent levels. The process involves setting initial text variables for occupancy display, running a checkFlag function to detect user presence changes, and utilizing the PubNub Here Now function to update occupancy counts dynamically. This approach helps illustrate the game's success and motivates players to invite others, enhancing the overall gaming experience.
Jul 28, 2019 1,016 words in the original blog post.
Developers are increasingly creating responsive HTML5 applications that work across various devices, blurring the line between traditional and mobile applications, and highlighting the importance of mapping and location capabilities. Mapbox emerges as a robust platform for building location-aware applications, as illustrated in a demonstration of integrating real-time geocoding and mapping into an AngularJS web application using PubNub, with only 44 lines of JavaScript and 73 lines of HTML and JavaScript. Geocoding, which translates text descriptions into map coordinates, and API mapping, which visually represents a user's location, are essential for enhancing mobile applications with location context. The process involves using Mapbox Geocoding and Mapping APIs, setting up a Mapbox developer account, and configuring services using PubNub BLOCKS for running serverless code. The user interface, built with minimal dependencies, allows users to send location queries and receive maps in real-time, showcasing the seamless integration of these technologies to facilitate the development of custom, location-enabled applications.
Jul 28, 2019 3,287 words in the original blog post.
Mapbox Directions API offers navigation features such as turn-by-turn directions, traffic-aware routing, and ETA calculation for driving, cycling, and walking, all integrated with their vector maps. This tutorial demonstrates how to implement real-time turn-by-turn navigation in applications, like taxi or delivery services, using Mapbox Directions BLOCK and PubNub for streaming geolocation data. It involves setting up a Mapbox developer account, configuring services, and utilizing PubNub BLOCKS to execute in-motion data functions, which calculate and publish directions to end-users. The tutorial provides a code walkthrough, detailing the use of Angular2 for the user interface and explaining the integration of necessary dependencies for a streamlined setup. Through a combination of JavaScript, HTML, and PubNub services, users can build a real-time navigation app that efficiently processes and delivers directions to clients, enhancing the functionality of location-based applications.
Jul 28, 2019 2,856 words in the original blog post.
Epoch is a versatile real-time charting library ideal for developers and visualization designers aiming to create smooth, high-performance visualizations using simple APIs. Built on D3.js, it focuses on both basic historical charts and real-time charts that display frequently updating time series data. The tutorial demonstrates the integration of Epoch with PubNub's cross-language SDKs to build a real-time chart, using a Python script as the data source that generates random integers and publishes them to a PubNub channel. On the client side, the tutorial outlines how to set up the necessary environment and create a time-series line chart using Epoch and jQuery, subscribing to the PubNub channel to push real-time data updates to the chart. The process highlights the simplicity of creating real-time visualizations with Epoch, suitable for applications in analytics, IoT, and monitoring.
Jul 28, 2019 1,729 words in the original blog post.
The article explores the concept and application of online learning, a machine learning approach that processes data in real-time by incrementally updating models, which is particularly advantageous for dynamic datasets such as IoT data streams. It contrasts traditional machine learning, which requires fitting entire datasets at once, with online learning's ability to handle data in subsets, allowing for faster deployment, frequent updates, and reduced memory usage. The article focuses on implementing Stochastic Gradient Descent (SGD) as an online learning method, which efficiently approximates the global minimum with fewer iterations than standard gradient descent. It details building a real-time learning model using Python and PubNub's Data Stream Network to facilitate continuous data consumption and model updating. The process involves data pre-processing, streaming, and model training, culminating in a system where the model's accuracy progressively improves as it adapts to new data chunks, achieving a validation mean accuracy of around 70% on a synthetic dataset.
Jul 25, 2019 3,860 words in the original blog post.
The tutorial delves into creating a voice-automated stock trading bot called TradeBot, using IBM Watson Text-to-Speech service and PubNub's real-time data streaming network. TradeBot operates by analyzing stock price updates and delivering audible alerts when prices cross predefined thresholds, with male and female voices indicating different levels. The system employs Node.js for scripting, IBM Bluemix for text-to-speech conversion, and PubNub for message publishing and subscribing. Functions, a serverless microservice, manages the orchestration of client requests and speech synthesis, simulating stock market environments due to the absence of real-time feeds. Enhancements could include periodic price updates and integrating real stock feeds, highlighting the application’s potential for traders and vision-impaired users, and encouraging further development of voice-enabled applications.
Jul 22, 2019 2,264 words in the original blog post.
In this continuation of a React Native chat app tutorial series, the focus is on implementing message history functionality, allowing users to store and retrieve past messages even after the app is restarted. This is achieved using PubNub's Storage & Playback feature, which stores message history and retrieves it when the app is refreshed, ensuring messages are displayed in chronological order. To enhance user experience, the tutorial also introduces a basic user authentication system, allowing users to differentiate messages based on sender identity by associating messages with user accounts. The authentication system is demonstrated through a simple login interface, using placeholder credentials for demonstration purposes, with navigation between login and chat screens managed by React Navigation. This setup facilitates a more personalized chat interface where users can see their messages displayed correctly. The next tutorial in the series promises to introduce real-time user presence features.
Jul 02, 2019 2,745 words in the original blog post.