Push Service plugin for BlackBerry WebWorks 2.0.0.54 error (Cordova 3.2) (newest versions of both SDKs) - html

I'm trying to use the Push Service plugin in my BlackBerry Webworks app (BB10 in HTML5).
I added the plugin through the command line like the documentation says, and checked that the com.blackberry.push folder was infact inside my plugins folder in my project. I ran the app in my device and the Web Inspector gave the next error:
TypeError: 'undefined' is not an object (evaluating 'window.webworks.defineReadOnlyField')
This error appears when the plugin tries to define the push constants like SUCCESS or INVALID_PPG_SUBSCRIBER_STATE, so obviously the plugin never starts to work and I can't use the push service.
I have my Push credentials fine (they work fine in my OS 7 app), and I was very carefull when I wrote the config.xml file. Here it is:
<widget id="Sample"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0" version="0.0.1">
<name>Sample</name>
<license href="http://www.apache.org/licenses/LICENSE-2.0"/>
<author email="something#somwhat.com" href="http://www.something.com">Something</author>
<content src="splash.html"/>
<access uri="http://www.mypushserver.com/Registro_Portalesv4/modules/Register" subdomains="true"></access>
<access origin="*"/>
<preference name="fullscreen" value="true"/>
<preference name="webviewbounce" value="true"/>
<description>Example</description>
<icon src="img/icono.png"/>
<feature id="blackberry.app"/>
<feature id="blackberry.push" />
<feature id="blackberry.system" />
<feature id="blackberry.invoked" />
<feature id="blackberry.ui.dialog" />
<feature id="org.apache.cordova" required="true" version="1.0.0" />
<rim:permissions>*
<rim:permit>access_shared</rim:permit>
<rim:permit>post_notification</rim:permit>
<rim:permit system="true">_sys_use_consumer_push</rim:permit>
<rim:permit>read_device_identifying_information</rim:permit>
<rim:permit>access_pimdomain_messages</rim:permit>
<rim:permit>bbm_connect</rim:permit>
<rim:permit>run_when_backgrounded</rim:permit>
</rim:permissions>
<rim:invoke-target id="example.sample.invoke.push">
<type>APPLICATION</type>
<filter>
<action>bb.action.PUSH</action>
<mime-type>application/vnd.push</mime-type>
</filter>
</rim:invoke-target>
<!-- Have an invoke entry here for when a notification is clicked on in the BlackBerry Hub -->
<!-- This will cause the application to be opened -->
<rim:invoke-target id="example.sample10.invoke.open">
<type>APPLICATION</type>
<filter>
<action>bb.action.OPEN</action>
<mime-type>text/plain</mime-type>
</filter>
</rim:invoke-target>
</widget>
What I did notice was that the function "window.webworks.defineReadOnlyField" is located in the webworks-1.0.4.11.js file wich I don't have included in my project because I'm using cordova.js as the BlackBerry WebWorks Documentation, Upgrading to WebWorks 2.0 suggested. So I think that maybe the push plugin is not updated for the new SDK or I'm missing something as well.
Any ideas? Thanks in advanced!
PS: I'm porting my app from Phonegap Android, and worked fine when I ported it to Blackberry, except for the plugins, wich I had to add and adapt so they could work (except for the push plugin).

The problem solves by downloading the newest version of the PushService Plugin (updated 10 hours after I posted the question), that has fixed all the problems I mentioned on my question.
Also, don't forget to add a tag with the ppg url to you config.xml file, otherwise the push service won't work.

Related

CSS and images of a Razor Class Library not loaded if adding reference directly from DLL

I have a RCL with razor components that have their own scoped CSS and some resources (like png background, etc.) in the wwwroot folder.
If I consume this library from a Blazor server app doing the add reference to the project in the same solutions, it works perfectly like described here
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/class-libraries?view=aspnetcore-6.0&tabs=visual-studio
But If I compile the RCL and add the reference pointing directly to the DLL nor CSS neither images are loaded
<Project Sdk="Microsoft.NET.Sdk.Web">
<!-- it works-->
<ItemGroup>
<ProjectReference Include="..\BlazorRCL.Library\BlazorRCL.Library.csproj" />
</ItemGroup>
<!-- doesn't work
<ItemGroup>
<Reference Include="BlazorRCL.Library">
<HintPath>..\BlazorRCL.Library\bin\Release\net6.0\BlazorRCL.Library.dll</HintPath>
</Reference>
</ItemGroup>
-->
</Project>

Working with dotnet and angular2

I have recently integrated a boostrap admin template (based on Angular2) in an asp project (here is the repo)
The thing is: when I am running tsc, all files compile well, but if I change html files, if the web browser (let say firefox) opened the project previously, the page never change, but if I open a new web browser (let say chrome) I can see the change. Now, if I change an html again, neither one can detect new changes in html files.
I think it is dotnet configuration, because I used the bootstrap angular template which is set up with npm lite server, and it has not any problems (I mean: change .ts files, .html files and it refresh always well)
To reproduce the problem, these are the steps:
npm install
dotnet restore
dotnet run
go to /pages/login <- It displays everything ok
edit login.component.ts: template: <h1> Hello!</h1>
go to /pages/login <- It keeps showing the login form
go to /pages/login (google-chrome) <- It shows the change
edit login.component.ts: template: <h1> Hello World!</h1>
go to /pages/login (google-chrome) <- It only shows Hello!
The asp app were caching the pages, so I changed the web.config
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache, no-store" />
<add name="Pragma" value="no-cache" />
<add name="Expires" value="-1" />
</customHeaders>
</httpProtocol>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>

HTML page to windows gadget

I created a basic HTML5 page with some canvas drawing and third party meter gauge.
The page works well in browser.
I created a Windows 7 gadget out of it like given here: http://blog.brandoncopley.com/?p=69
But the gadget shows only white color.
It seems like no javascript s getting executed or canvas drawing is done.
I have tried following option to resolve the issue: http://www.sevenforums.com/tutorials/140358-gadgets-not-displaying-correctly-windows-7-fix.html
The Reset_gadgets.bat file also did not help.
All other gadgets are working good.
The gadget.xml looks like below:
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>simple</name>
<version>1.0.0.0</version>
<author name="MaxRecursion">
<info url="maxrecursion.wordpress.com" />
<logo src="logo.png"/>
</author>
<copyright>© MaxRecursion.</copyright>
<description>This is a simple gadget.</description>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="index.html" />
<permissions>Full</permissions>
<platform minPlatformVersion="1.0" />
</host>
</hosts>
</gadget>
I am new with the Windows 7 gadgets, what can be the issue.
Gadgets run on IE7, so they don't support canvas. Excanvas (http://excanvas.sourceforge.net/) seems to work fine, and it's very easy to use. Just download the .js, put it in a folder with your gadget, and call it from the html before you use anything canvas related. That's it, it works its magic by itself, and the canvas tag will work the way it's supposed to.

adobe air native extension config files

I've been googling for something seemilgly simply, but I can't seem to find an answer: I am building some adobe native extension (ios/android). The native code is expecting to find a config.plist (ios) or .properties(android) file to work. The file is expected to be in the main res bundle (ios) or assets folder (android).
How should the adobe air app developer provide this file? Obviously I cannot package it inside the .ane file since it's app-specific...
Thanks!
I think you should be looking to the application descriptor for this sort of information. Eg info.plist additions can be added to the descriptor by adding the InfoAdditions node of the iphone section, for example:
<iPhone>
<InfoAdditions>
<![CDATA[
<key>UIRequiresPersistentWiFi</key>
<string>NO</string>
]]>
</InfoAdditions>
</iPhone>
http://help.adobe.com/en_US/as3/iphone/WS789ea67d3e73a8b2-48bca492124b39ac5e2-7ffb.html
And android has the manifest additions:
<android>
<manifestAdditions>
<![CDATA[
<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<application>
<receiver ... />
</application>
</manifest>
]]>
</manifestAdditions>
</android>

My html5 game is not working in BB10 simulator

I have created one html5 game.
As per bb10 webworks guidelines I have made config.xml file.
my game is working fine in ripple emulator .But when i tested it in BB10 Dev Alpha Simulator only black screen appears..
what is issue??
I have uploaded my code here.
config.xml
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.5" id="mani" xml:lang="en">
<author href="http://www.example.com/"
rim:copyright="Copyright 1998-2012 My Corp">My Corp</author>
<name>mani</name>
<icon src="logo.png"/>
<content src="index.html"/>
<feature id="blackberry.identity" required="true" version="1.0.0.0"/>
</widget>
And I added script tag in index.html file.
Rest thing is untouched.
index.html
<script src="local:///chrome/webworks.js" type="text/javascript"></script>
If you are getting a black screen, then I expect there is a runtime error that has prevented your game from starting and/or
Here are instructions on how to use remote-web inspector. I recommend connecting, opening the console panel and reloading your app. It should tell you right away if there is an error:
https://developer.blackberry.com/html5/documentation/web_inspector_overview_1553586_11.html
Do you have any remote content being used in your app? If so, I suspect the application does not have permission to access that content as I don't see any <access> elements in your config.xml. Make sure you properly whitelist all remote URLs: https://developer.blackberry.com/html5/documentation/access_element_834677_11.html