Push the web application through UrbanAirship

I want to use the urban airship to send notifications of type push to a web application. I found an example on https://github.com/blackberry/Cascades-Community-Samples/tree/master/UrbanAirshipClient but it is an application c / c++. Is it possible to grow a web application via urban airship?

Hi, it is possible.

Urban airship servers simply push Push BlackBerry servers that relay this push to the end-user device. This means that the only extra step that is really needed is, when registering with the push service, to register as urban airship witih as well as the link between urban airship, Push BlackBerry server and end-user device exists.

Registration for the Push Service is essentially the same. You must create a PushService object:

   blackberry.push.PushService.create(
        {
            invokeTargetId: INVOKE_TARGET_ID,
            appId: BLACKBERRY_PUSH_APPLICATION_ID,
            ppgUrl: BLACKBERRY_PUSH_URL
        },
        createPushServiceSuccess,
        createPushServiceError,
        simChangeCallback,
        pushTransportReadyCallback
    );

On createPushServiceSuccess, you create the channel by the usual method.

/* We created the PushService instance. */
function createPushServiceSuccess(service) {
    /* Store our PushService object. */
    pushService = service;

    /* ...other actions here potentially... */

    /* Create channel to receive pushes. */
    pushService.createChannel(createChannelCallback);
}

And finally, on the creation of the channel, we will register with urban airship.

/* When a channel is attempting to be created, this will trigger. */
function createChannelCallback(result, token) {
    var xhr;
    if (result === blackberry.push.PushService.SUCCESS) {
        /* On success, we'll register with Urban Airship. */
        xhr = new XMLHttpRequest();
        xhr.open('PUT', HTTPS_GO_URBANAIRSHIP_COM_API_DEVICE_PINS + token, true);
        xhr.onload = function () {
            console.log('Urban Airship: ' + this.response);
        };
        xhr.setRequestHeader('Authorization', 'Basic ' + URBAN_AIRSHIP_APPENCODED);
        xhr.send();
    } else {
        console.log('createChannelCallback: ' + result);
    }
}

Above, we will ensure that the channel was created successfully. The xhr request is purely related to urban airship and is the extra piece that we need. We use a few defined constants (previously).

  • HTTPS_GO_URBANAIRSHIP_COM_API_DEVICE_PINS is a string matches the URL of urban airship registration default PIN.
'https://go.urbanairship.com/api/device_pins/'

 

  • URBAN_AIRSHIP_APPENCODED is a combination of two other channels; coded using window.btoa ().
window.btoa(URBAN_AIRSHIP_APPKEY + ':' + URBAN_AIRSHIP_APPSECRET);
  • URBAN_AIRSHIP_APPKEY and URBAN_AIRSHIP_APPSECRET are obtained from urban airship console when you configure your application as follows.

Finally, the last piece, you need to do is provide your credentials to Push BlackBerry in the console of airship urban itself. It is important to use the full URL including your CPID when you fill out this information. This is information which is sent to you by BlackBerry when you sign up for credentials EVAL or PROD.

Beyond that, the implementation of the push, summoning, etc. would be all follow the regular WebWorks Push Application structure.

Tags: BlackBerry Developers

Similar Questions

  • appeal to the web application? ¿

    Hello, I want to know how can I call a web application, that is to say, the appeal from the blackberry to the address corresponding to the web application, can you give an example? Thank you

    Nitin provided code is not correct, you may not login suffix (which he coded as ";) interface = wifi"), just put the URL in.

    Please refer to this article KB correct code:

    http://supportforums.BlackBerry.com/T5/Java-development/invoke-the-browser/Ta-p/445362

    You will find the search box very useful to find knowledge base articles like this one that will help you with a lot of you will find development issues.

  • Measures to develop the Web Application with JDeveloper 11.1.1.6.0

    People,

    Hello. I have implemented PeopleSoft Campus Solution 9.0 revision 5 for a University.

    I need to develop an application for Admission online for future student to apply for admission.

    My installations of PeopleSoft are below:

    Server machine: Oracle Linux 5.10 (64-bit)

    Client computer: Windows XP Professional (64 edition) with the Internet Explorer browser

    Architecture Internet Oracle Linux 5.10 Server:

    (1) database server: Oracle Database 11 g version 11.1.0.6.0 is

    (2) the server application: Tuxedo 11 g

    (3) web Server: Web Logic 10.3.6.0 and JDK 1.7.0_09

    (4) browser: Firefox Mozila

    (5) two Instances of huge database on the database server: 8.53 PeopleTools and Campus Solution 9.0.

    To develop the application for Admission online, I made the 4 parties with WebLogic 10.3.6 and JDK 1.7.0_09 as below:

    (1) install ADR (Application Development Runtime) 11.1.1.6.0 (64-bit)

    (2) install the RCU 11.1.1.6.0 to create the scheme of OWSM_MDS (32 bit)

    (3) create a WebLogic 'Domain_CS' domain in WebLgoic 10.3.6.0 in support of MARC 11.1.1.6.0.

    (4) install JDeveloper 11 g 11.1.1.6.0 Studio Edition including WebLogic 10.3.5.0.

    The development environment for the online application for Admission is JDeveloper 11 g 11.1.1.6.0 Studio Edition. I just installed this PeopleSoft system. I don't have any experience using it. The first step is to run the command:

    $./quickstart.sh

    JDeveloper 11g Quick Start Menu appears as below:

    1) start with WebLogic Server 10.3.5

    (2) launching Oracle JDeveloper 11 g

    (3) set up areas for Oracle ADF

    (4) access Oracle JDeveloper 11 g Documentation Online

    (5) domain upgrade to version 10.3.5

    (6) access online documentation

    I don't know the outline of comprehensive measures to develop the Web Application with JDeveloper. We will understand that it out by steps associated with Quick Start Menu.

    My questions are:

    (1) do I need to create or extend a field in WebLogic 10.3.5.0?

    (2) how to develop the Web Application with JDeveloper? How connect JDeveloper with WebLogic 10.3.5.0?

    (3) how to configure the domain for the ADF ADF being installed in another directory?

    (4) folk would provide the outline of measures to develop the Web Application with JDeveloper?

    Thanks in advance.

    Sorry, I don't work with AAWS or PeopleSoft products. You have searched on Google for samples?

    Ultimately AAWS are just web services that allows you to collect and send data. You create the user interface as you would for any web service based on the model layer. Start with samples for the integration of web services in the ADF to familiarize yourself with the process and then try to get some data of AAWS.

    Timo

  • Creative sync cloud app. problem with the web application

    Hello

    I have some problems with the synchronization of files in the creative Cloud Files folder on my computer (I use a Mac) and the Creative Cloud Web App. practically the files I have on my computer folder do not appear on the web (and I can't create links of sharing for them) and vice versa. We have a team account and we can exchange files between us, but nothing appears on the web application. The problem applies to all members of the team.

    There is a problem with the service or it could be a local problem?

    Thank you

    Florin

    @ursuss - what you see in the creative Cloud Files folder on your computer must match what you see on the site Active CC to https://assets.adobe.com/files.

    Use the collector for the Adobe Log tool to https://helpx.adobe.com/creative-cloud/kb/cc-log-collector.html and newspapers as well as the explanation of the problem by e-mail at [email protected]. Please provide additional information indicated by Warner Harress in this Adobe forum post https://forums.adobe.com/message/8385752#8385752.

  • Have a tag to display the detailed view of the web application

    Hi all

    I try to display the detailed view of a web application, but I don't know how to change the tag to do this. What I use now is {module_webapps, 29355, i, 10524754}. What should I change or add to this tag to display the web application content in the detail view?

    Thank you. !

    Thank you, Liam, I think I found a workaround by inserting the tag because it is in the body of the module events instead. Now it shows the detail view. Weird, but it works.

  • What happened to the image field when you create a field of type of image for the Web application?

    What happened to the image field when you create a field of type of image for the Web application?

    The answer is that the point of the IMAGE has been changed to the MEDIA.

    Sorry, Ian, what research for this discussion, I got no results. All good and thanks for the carillon. Hope everything goes well.

    Mouma

  • Cannot access the HFM applications through the workspace

    Hello

    I use HFM 11.1.1.3 version and Oracle database version is 10g. We have the Oracle database has migrated to the new server and configured the HFM applications to this new database server. When I tried to access the HFM application through the workspace, I am getting error below. Please could you help me on this. The error message says that the table or view does not exist. But I'm not able to find which table I missed it.

    Track: Error reference number: {464E7E1C-A859-4CB8-B168-99105BB1B756};
    Username: native Directory

    NUM: 0x80004005; Type: 1; DTime: 14/05/2013 01:42:25. SVR: Localhost; File: CHsvDSSQL.cpp; Online: 2593; Worm: 11.1.1.3.500.3124;

    DStr: ORA-00942: table or view does not exist;

    NUM: 0x80004005; Type: 0. DTime: 14/05/2013 01:42:25. SVR: Localhost; File: Events.cpp; Line: 57; Worm: 11.1.1.3.500.3124;
    NUM: 0x80004005; Type: 0. DTime: 14/05/2013 01:42:25. SVR: Localhost; File: CHsvDSSystemChange.cpp; Line: 179; Worm: 11.1.1.3.500.3124;
    NUM: 0x80004005; Type: 0. DTime: 14/05/2013 01:42:25. SVR: Localhost; File: CHsvSystemChange.cpp; Line: 258; Worm: 11.1.1.3.500.3124;
    NUM: 0x80004005; Type: 0. DTime: 14/05/2013 01:42:25. SVR: Localhost; File: CHsvSystemChange.cpp; Line: 96; Worm: 11.1.1.3.500.3124;
    NUM: 0 x 80040236; Type: 1; DTime: 14/05/2013 01:42:25. SVR: Localhost; File: CHsvSession.cpp; Line: 270; Worm: 11.1.1.3.500.3124;
    NUM: 0 x 80040236; Type: 0. DTime: 14/05/2013 01:42:25. SVR: Localhost; File: CHsvDataSource.cpp; Line: 531; Worm: 11.1.1.3.500.3124;
    NUM: 0 x 80040236; Type: 0. DTime: 14/05/2013 01:42:25. SVR: Localhost; File: CHsxServerImpl.cpp; Line: 2189; Worm: 11.1.1.3.500.3124;
    NUM: 0 x 80040236; Type: 1; DTime: 14/05/2013 01:42:25. SVR: Localhost; File: CHsxServer.cpp; Line: 1467; Worm: 11.1.1.3.500.3124;
    DStr: OpenApplication: DEV;
    NUM: 0 x 80040236; Type: 0. DTime: 14/05/2013 01:42:26; SVR: Localhost; File: CHsxClient.cpp; Online: 2373; Worm: 11.1.1.3.500.3124;
    NUM: 0 x 80040236; Type: 0. DTime: 14/05/2013 01:42:26; SVR: Localhost; File: CHFMwManageApplications.cpp; Line: 206; Worm: 11.1.1.3.500.3124;

    Thank you
    Michel K

    I solved this problem. I gave bad database schema in the udl file.
    Changed the udl with correct schema file and solves the problem.

  • Problems to open the Web Application host with only IE comments

    I'm running a Windows 2008 R2 using VMWare Workstation 7.1.5 prompt.  The customer has an installed web application which is only compatible with MS Internet Explorer.  The guest network is configured to use NAT.

    When my host is connected to the local network of my company, I can use Internet Explorer to host to access web applications of the customer without any problem.

    When my host is not connected to the local network of my company (completely disconnected, or connected to a different network) I can't use Internet Explorer of the host to access web application of the burst.  But I can use the host Chrome or Firefox to access the customer applications.

    My company has my locked host IE while I can't make changes to it.  Is there something I can do with my network settings to get IE think it is connected to the local network of the company?

    Thanks Steve

    It wasn't a DNS issue since I knew that I was able to connect using Chrome.

    It was a restriction of IE, but I was finally able to work around this problem.  My company gave me access to a local account on the machine that had full administrative rights.  Since it is a local account is not all corporate policies pushed to him.  In case you're wondering, I created a shortcut with the following command:

    C:\Windows\System32\runas.exe/user:\administrator "C:\Program Files (x 86) \Internet.

    Runs like a champ.  You will be asked for the password for the local account and then you are able to IE without restrictions.

    I wish that we thought of this earlier

  • BlackBerry Smartphones test web application through BlackBerry Simulator.

    Hello

    I have to test my web application on a blackberry Simulator. My first question is: if it is possible to test any web application using the Simulator or I can test only the rich applcations of BlackBerry?

    I do the following:

    1. I downloaded Black Berry Email and MDS services Simulator 4.1.2 and BlackBerry_Simulators_4.7.0.78_9500 - Vodafone.exe.

    2A started the MDS Simulator first, then the BB Simulator.

    But I am not able to connect to internet, BB Simulator. Am I missing a config in the MDS Simulator.

    Help, please. This is urgent. TIA.

    Hello

    Open the rimpublic.property file. The rimpublic.property file is located in the following locations: \Program Files\Research In Motion\BlackBerry Email and Simulators\MDS\config of MDS

    Then add these commands in the section [MANAGER HTTP], update the following:

    application.handler.http.proxyEnabled = true

    application.handler.http.proxyHost = hostname

    application.handler.http.proxyPort = hostport
    application.handler.http.proxyUser = username

    application.handler.http.proxyPass = password

    application.handler.http.proxyAutoConfig = true

    application.handler.http.proxyAutoConfigURL = http://URL_to_Your_Config_File

    application.handler.http.proxyAutoConfig.ScriptCacheTime = 0

    Save these changes and to make with your steps... that will succeed to open a web application on your Simulator... more can know which web application (i.e. URL) that you want to test... I had the same problem, but somehow managed to open sites to Simulator after adding these commands. But my main concern is to open a URL in sector public siebel that is installed on a server in 9530 Simulator device. Can you/only you know which deals with the implementation of CRM siebel on simulators could you please suggest me doing this task.

    Thanks in advance

    Hochart

    India

  • Availability of the Web Application context failed

    Gurus,

    I'm getting the following as an error in the Validation report after you apply the hotfix for the service of the provider (11.1.2.3.505)

    It comes before applying patches on the EPM system

    Before Patch.png

    This is after you have applied the patches on the EPM system

    After Patch.png

    I don't know what went wrong. When you try to access the URL in the browser I get "Error 404 - not found" error.

    This is the screenshot of the registry for the AnalyticProviderServices0 Web Application and the validationContext shows the same URL

    registry_report.png

    Should I reconfigure the service provider-> deploy to the application server, to get rid of this error message?

    Any help will be much appreciated.

    There is nothing to worry, have a read of more to life than that...: APS 11.1.2.3.502 diagnosis failure report

    See you soon

    John

  • "Edit" model of the Web application, possible for the user to change the point of "Enabled" to "disabled"?

    I was wondering if it is now possible for a user to change a Web App element and changed to Enabled to disable?

    I would like users to be able to remove their own app web site elements, but deletion would mean he would disappear from the box of Directors (which is not good for us!), so is it possible for them to 'Turn off' an element of web application?

    Thank you

    I do not believe, but you can add your own custom field 'disabled' (say a Boolean field). Then when they click 'delete', it checks this field and submits the Boolean value True (1).

    Then you can omit under condition of any webapp element that has "Disabled" = 1.

    Client side, you can use JS or CSS, or if you use the liquid you could do this on the server side.

  • ADF Mobile: connect with the web application

    Hello

    I'm starting the age of mobile application. (my version of jdeveloper is version 11g 2)...

    I need to know is easy to create applications mobile adf in the ADF web application?

    With regard to this demo:- http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADFMobile/adfmobile.htm how can I adopt for my needs?

    My web application is Version 11.1.2.2.0. So without re-creating this application in higher version (Version 11.1.2.3.0), can't do Mobile App?

    hopping all coordinated to solve my problem...

    Thank you.

    Sorry for the late reply. The ADF webapplication can be made in any version of JDev, since it is just a web service 'plain '. ADF Mobile is supported only 11.1.2.3 (or), but they (the web service and mobile application) do not have to be developed using the same version of JDev.

  • How to view several categories of items in the Web application list? Change list listbox to list box to select the category in the submission process?

    Hello!

    1.

    I'm trying to get my page for webapp of list items that are part of a few categories. I understand that if I want to see that one category, I just need to do the normal process to choose this category and put him outside. So my question is: How can I view several categories of items in a Web application on a single page. I tried this

    {module_webapps, WEBAPP_ID, c, CATEGORY_ID1, 10, 1} {module_webapps, WEBAPP_ID, c, CATEGORY_ID2, 10, 1}

    This displays only the whole of the first category, then all the other who will not succeed by date order.

    I also tried this for fun:

    {module_webapps, WEBAPP_ID, c, CATEGORY_ID1 & CATEGORY_ID2, 10, 1}

    How can I go to?

    2.

    I'm looking to allow users to enter a webapp item and allow them to select a category to link to this article.

    < label for = "CAT_Category" > category (you can choose more than 1) < span class = "req" > * </span > < / label >

    < select name = "CAT_Category" id = "CAT_Category" class = "cat_listbox" lines = "4" multiple = "multiple" style = "" height: 60px banner; ">"

    < option value = "CATEGORY_ID1" > - Option 1 < / option >

    < option value = "CATEGORY_ID2" > - Option 2 < / option >

    < / select >

    Is it possible for me to change the style of the listbox in a style box so that the user doesn't have to Ctrl + click on options?

    No answer to no. 1, but I really want to know also.

    N ° 2

    If you already know the category list & ID you can manually create a list of checkboxes

    something like this should work

  • display the items in the Web application on a default map, zoomed in on the Indian ocean?

    Hi, I want to install a web application to display locations for a store, but after adding some web elements, all in the middle of North America, when I load the map app webapps, the default view is zoomed in on the Indian ocean...

    Shouldn't; little zoom in the nearest you address web app components?  I have to manually zooom all the way, then in a marker that is properly pinned...

    I had similar problems on some sites that usually comes from not having BC does not zip codes in their database.  You see a pin point in the middle of the ocean? If Yes, then this particular postal code for this element of web application is not in the database, in this case, contact technical support, and it adds the postcode.

    If you do not see a pin point, I'm guessing that maybe your default search radius is maybe average to great and he's trying to adapt to everything on the screen in the search radius?

    Try to set the radius of search at different levels and see what you get results and anyway maybe contact the Support with a list of specific zip codes to make sure they are in their database.

  • the difference between the Web application server and Web server?

    What is the functional difference and the relationship between the Server Web applications and Web server, for example: Weblogic is the Application Web server, IIS is the Web server, Apache is the Web server and Oracle Application Server is the Application Web server? Someone said, Web Application Server is a Web server, but more functional superset, seems in this case, we can also use a server of web applications as a web server. For example, we can use Weblogic, but do not use IIS and Apache, please correct me?

    Published by: user2571802 on February 28, 2010 18:51

    Hello

    Have a read of http://www.javaworld.com/javaqa/2002-08/01-qa-0823-appvswebserver.html if all goes well it should give you a little more understanding.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

    Published by: JohnGoodwin on March 1, 2010 08:17

Maybe you are looking for