push – Inside BlackBerry for Business Bloghttp://bizblog.blackberry.com
Fri, 09 Dec 2016 17:21:51 +0000enhourly1http://wordpress.com/http://0.gravatar.com/blavatar/20ac8e1f171f33d226baa862f286c029?s=96&d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.pngpush – Inside BlackBerry for Business Bloghttp://bizblog.blackberry.com
Developing Enterprise Apps for the Work Space of BlackBerry 10 Part 2: Application Invocation, Push, & Networking Constraintshttp://bizblog.blackberry.com/2013/09/developing-enterprise-apps-for-the-work-space-of-blackberry-10-part-2/
http://bizblog.blackberry.com/2013/09/developing-enterprise-apps-for-the-work-space-of-blackberry-10-part-2/#respondMon, 23 Sep 2013 14:12:58 +0000http://bizblog.blackberry.com/?p=11489/ Read More]]>Welcome to Part 2 of our Developing Enterprise Apps for the Work Space of BlackBerry 10 series. The goal of this series is to help lay the foundation needed for you to successfully develop enterprise solutions for BlackBerry 10. By now, I hope you’ve had a chance to view Part 1 to pick up some insights on File System Access & Application Testing in the Work Space. That post, like this one, covered considerations that should be kept in mind when building Enterprise apps, targeted for deployment to the work space of BlackBerry Balance enabled devices. In Part 2, we’ll cover Push for enterprise apps, Application Invocation, and Networking constraints.

Application Invocation

One of my favorite BlackBerry 10 features from the development perspective is the Invocation Framework. It helps developers avoid recreating the wheel by granting them the ability to leverage existing functionality of core apps (eg. native calendar, address book, and more.) as well as custom built applications. For example, if you’ve built an app that needs to be able to read .pdf files, you could of course take on the task of writing the logic yourself so that your app can process, render, and display the PDF files to the user. However, by using the invocation framework there’s no need to start from scratch. You can invoke an already existent PDF reader and have that invoked app read & display the file for users.

This concept applies to both the work and personal space. However, when you’re developing apps for the company administered work space, you have to ensure that you work with BlackBerry Enterprise Service 10 administrators to ensure that any app you’re invoking will be deployed to the work space. You should even consider the version of the app you’re invoking; ensuring it’s the same version that will be deployed by the BlackBerry Enterprise Service 10 admin will save you future headaches.

Push

Push is one of the most powerful features of the BlackBerry toolset. It allows you to proactively, securely, and efficiently distribute data to your application. It has minimal battery impact since applications do not have to be running in order to listen for and receive data. On the device, the Push Service (part of the previously discussed Invocation Framework) receives the push and wakes up the app, delivering the data payload at that point. But, it’s important to take into account that Push for enterprise apps differs from Push for personal applications. Push for apps in the personal space is done using the BlackBerry Internet Service, our public Push solution. As a developer you’re required to register for usage of this channel. Users of apps leveraging the BlackBerry Internet Service can opt in/opt out of receiving data via this channel in the Application Settings.

For enterprise apps, Push uses your company’s infrastructure for data distribution, rather than the public BlackBerry Internet Service. No registration is required for using Push in the enterprise scenario since when you deployed the BlackBerry Enterprise Service 10 environment in your organization you got the automatic benefit of Push capabilities. Follow these steps to activate Push capabilities in your enterprise app for the work space:

Since data transmitted to and from the app will always be routed through your company’s infrastructure, plan to be respectful of your company’s resources by reducing unnecessary app chatter & limiting payload size. Consider compressing payloads before they’re transmitted.

The app might also have the requirement of connecting to some of your company’s intranet hosted resources. During the development/testing phase of solution building, developers usually side load apps to rapidly test certain functionality and connectivity. Prior to version 10.2 of the BlackBerry 10 OS, side loading of apps onto BlackBerry 10 devices deploys them by default to the personal space. (Part 1 of this blog posts covers side loading) Since the personal space is administered by the user and NOT the company, it won’t have explicit granted access to your company resources via IT policy. The best way to ensure that your app is performing the networking tasks and following its design is to deploy it to the work space and test it there. That gives you the best indication as to how that app will perform the networking tasks when deployed to your company devices.

You’re now armed with the knowledge that you need in order to get you started developing solid enterprise solutions for BlackBerry 10! Access to intranet resources, taking advantage of the invocation framework to save time and development costs, and Push technology to keep end users up to date with the latest information are only a few benefits of enterprise apps for BlackBerry 10. Keep in mind the topics discussed in this post combined with Part 1 and you’ll be able to develop well-designed, solid, immersive enterprise apps. Feel free to use the comments below to tell us how you were able use the power of BlackBerry 10 to solve problems for your enterprise, or to ask any questions you may have on the process that’s been outlined.

]]>http://bizblog.blackberry.com/2013/09/developing-enterprise-apps-for-the-work-space-of-blackberry-10-part-2/feed/0part2-workspace-w600mauwhitebbThe Guide for using Push technology in your Enterprise Apps, now with an exciting Video!http://bizblog.blackberry.com/2013/06/push-enterprise-apps/
http://bizblog.blackberry.com/2013/06/push-enterprise-apps/#respondThu, 06 Jun 2013 14:27:42 +0000http://bizblog.blackberry.com/?p=10989/ Read More]]>John Mutter and Brent Thornton, of the BlackBerry Enterprise Developer Partnerships team, have contributed this post for the Inside BlackBerry for Business Blog.

Enterprise apps are changing the way that we work, undoubtedly for the better. Access to behind-the-firewall data for a workforce that is constantly on the move provides increased productivity, can reduce the margin of error in reporting, fosters collaboration, and the list goes on.

Building push technology into your enterprise apps takes things to a whole new level. Push is an essential component of the real-time, always-on experience of BlackBerry devices. It offers an incredibly efficient and reliable way of sending information to your users in real time. Check out the video below for our take on push technology in enterprise apps:

IMPORTANT: Do not load the app by side loading as it loads to the personal space. Your application needs to be deployed from BlackBerry Enterprise Service 10 in order to make use of enterprise push. This way the app will appear in the work space and can be received through BlackBerry World for Work.

Once deployed, launch your application (You must run your application at least once to have it register with the push service).

Start pushing

Breaking it down – The Important Stuff

Taking a look at PushManager.cpp, here is what happens in the code:

You kick off by registering your application with the Push Service using your Application ID and Invoke-target ID.

Once the channel is completed successfully, push is ready to go. There are a few additionally items you will want to take care of. In our code you will see:

m_pushService->registerToLaunch();

This tells the push service to launch the application when a push arrives. This needs to happen if you plan on processing the push. If you only want to see push data when the app is open, this step is not needed.

Now for the most important piece of the puzzle, what to do with the push payload? When a push arrives on the device the Push Service checks what Application ID in the push header matches an application on the device that has registered with the same Application ID. It then invokes the application associated with that ID.

In the constructor of the PushHandler class we registered the invoked SIGNAL with an invoked SLOT function.

//Read all the push data from the payload
QString message = payload.data();

You can choose to process the data however you like. In our case we interpret the priority and update the UI and notifications accordingly.

Common Push issues in the Enterprise:

If you have any other samples that were built in cascades and aren’t working: Make sure you remove the following from the bar-descriptor.xml file. It is for public push only.

<permission system="true">_sys_use_consumer_push</permission>

If you have read about the Push Service SDK anywhere for the server, you can use this in the enterprise, but it is not necessary. It is much easier to build the HTTP POST yourself on the server. The Push Service SDK is a great tool for consumer push.

Make sure your invoke-target id’s are unique and match between the code and the bar-descriptor.xml file.

Fun Fact of the day

You can register an app target with multiple application ID’s if you like. That way, a different Push transaction can perform different tasks within the same application.

The Push Server

Building applications that leverage Enterprise Push is easier than you think. The process involves a server-initiated HTTP POST transaction to the BlackBerry Enterprise Service hosted by your company. Before you begin, you need a few details from your BlackBerry Server Administrator to be successful.

BlackBerry Enterprise Service Host Name

BlackBerry Enterprise Service Push Port

E-Mail Address or PIN of the Application User (Although the E-Mail address is recommended)

You will also need the following details from the Developer of the client application on the BlackBerry.

The unique BlackBerry Application ID from the BlackBerry Application you are pushing to

The format of the data payload you intend to push (e.g. JSON, XML, Text, etc…)

Once you have obtained this information, I have written a C# sample Method that will complete the HTTP POST transaction for you. Keep in mind, there are a lot of additional options and headers you can find on the BlackBerry Developer Website.

When evaluating solutions to enable your business with mobile applications that go far beyond email, calendar, and PIM, the best practice is to ensure you are making the most of what’s available. I’ve worked in this post to establish a benchmark of how BlackBerry solutions can enable business collaboration and enterprise applications with four key elements.

Connectivity

Although this sounds pretty basic, it’s really the core of what’s needed to get things done. When leveraging the BlackBerry Enterprise Solution, this aspect is built in from the ground up and really cannot be any easier. With a service called MDS-CS, you have that built-in “VPN-Like” connection to allow you easy access to the secure data stored behind the firewall. This is a key differentiator, as without this out-of-the-box connectivity behind the firewall, complex and potentially costly solutions would need to be created in order to achieve secure access to corporate data.

Push

Many of us are already familiar with the term “Push”. As a brief primer, push is a service that sends data to a device without the device having to send a request for that data. This is why you don’t have to manually check your email – new messages simply appear the moment that they arrive. It’s a great protocol for delivering information in real time and keeping you connected. But the story doesn’t end here – let’s look at what can be accomplished with Push technology in a business setting.

First and foremost, you have the ability to push data to an app and even notify the end user when something has arrived. Secondly, you can push that information directly to the BlackBerry Hub in BlackBerry 10. Consider how a business user works and the fact that they’re constantly in their inbox. When they wake up in the morning, they go to their inbox; before they go to bed, they are in their inbox. It follows, then, that your business applications should also have a presence here. For example, let’s say that you want to send your CEO the daily sales reports or business intelligence data. Put it right where they’ll be: the inbox! With the invocation framework introduced in BlackBerry 10 you can have them tap on the notification in their inbox and thereby invoke your app.

Secondly, Push also solves the issue that apps need to work offline. Executives often use their BlackBerry smartphones on flights and trips all around the world. Many “send” messages while in transit, and when they land their messages are sent without them even having to lift a finger. Your applications can work the same way; once you build into the workflow a system that can push down the requests to their devices, the requests will be waiting for them until your users have the downtime to go through and take action. They will absolutely love you if you make them more productive on the airplane, and especially if you design it so they do not need to go back to their PC to approve or interact with the information.

Management

Beyond building your enterprise app, it’s important to consider its deployment within your organization. With BlackBerry 10 we’ve created the App World for Work, which gives you the ability to host your confidential application behind the firewall, accessible only to employees within your business. This is enabled as soon as the device is activated against BlackBerry Enterprise Service 10, when the BlackBerry Balance feature comes alive during device activation. You can then make it available through App World for Work and the employees can download it, or you can make it a mandatory application which will then automatically be pushed to employee devices. Employees also have the ability to manage available upgrades within App World for Work to ensure that the latest maintenance releases and enhancements are available.

If you’re building applications which you’re looking to sell to enterprise customers, you can either provide them the application to host in their environment or you can submit your application to BlackBerry App World and simply recommend that your customers flag the application for work. Administrators can select publicly available apps from BlackBerry App World, which makes the application appear in App World for Work as a recommended download for employees, manageable like any other internal applications.

Standards-based Development

Let’s face it, when building applications for mobile devices there are many different tools and languages available, and it can be daunting to make a selection. Even some of the MDM providers who try to enable enterprise applications require you to learn their tools in order to build, manage, and secure mobile applications. With the security elements already built into the BlackBerry Enterprise Solution, all that is left to do is build the app. We’ve made it easier than ever by supporting standards-based development. First with HTML5, CSS and JavaScript, you can write and in many cases reuse samples of code which can then be compiled with our BlackBerry WebWorks tool to create a BlackBerry app. Aside from being simple to build, the beauty of the BlackBerry WebWorks development solution is that it supports BlackBerry 6 and BlackBerry 7 OS, BlackBerry PlayBook tablets, and the upcoming BlackBerry 10 platform. You can also go really deep to create customized extensions that leverage the core of the BlackBerry OS and hardware. We’ve got loads of samples for you to check out on http://developer.blackberry.com/

If you go a step further and would like to develop using our Native Software Development Kit, the core of the language is C++. Combined with our Cascades tool, you can build some serious applications that not only increase productivity at your company, but have a beautiful interface.

When you’re evaluating solutions to solve your business problems, take a look at Connectivity, Push, Management, and Standards-based Development to see how they can help you in your quest for designing and implementing functional and intuitive business apps. The Enterprise Partnerships team here at RIM is ready to help!