03-23-2014 10:46 AM
I'm new to bb dev. I am trying to make my app visible on the share list of the bb browser. I read about registering an app as a target app abit but after modifying my bar-descriptor and redeployed i still dont see my app on the list of candidates to receive share from the bb browser. is it possible that there is a security feature which prevent bb browser from sharing to apps which being developed (not signed and publis yet)?
Solved! Go to Solution.
03-23-2014 11:57 AM
Welcome to the forums.
There is no security feature, if you have the correct lines in your bar-descriptor.xml it should work.
Post what you've got already and someone will let you know where the problem lies.
03-23-2014 12:19 PM
Here is my bar-descriptor:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <!-- Copyright (c) 2011-2013 BlackBerry Limited. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <qnx xmlns="http://www.qnx.com/schemas/application/1.0"> <!-- BlackBerry 10 application descriptor file. Specifies parameters for identifying, installing, and launching native applications on BlackBerry 10. --> <!-- A universally unique application identifier. Must be unique across all BlackBerry 10 applications. Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. --> <id>info.noip.darkportal.HelloWorld</id> <!-- The name that is displayed in the BlackBerry 10 application installer. May have multiple values for each language. See samples or xsd schema file. Optional. --> <name>HelloWorld</name> <!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. Values can also be 1-part or 2-part. It is not necessary to have a 3-part value. An updated version of application must have a versionNumber value higher than the previous version. Required. --> <versionNumber>1.0.0</versionNumber> <!-- Fourth digit segment of the package version. First three segments are taken from the <versionNumber> element. Must be an integer from 0 to 2^16-1 --> <buildId>1</buildId> <!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. --> <!-- <versionLabel></versionLabel> --> <!-- Description, displayed in the BlackBerry 10 application installer. May have multiple values for each language. See samples or xsd schema file. Optional. --> <description>The HelloWorld application</description> <!-- Copyright information. Optional. --> <!-- <copyright></copyright> --> <!-- Name of author which is used for signing. Must match the developer name of your development certificate. --> <author>Example Inc.</author> <category>core.media</category> <configuration name="Device-Debug"> <platformArchitecture>armle-v7</platformArchitectu
re> <asset path="arm/o.le-v7-g/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> </configuration> <configuration name="Device-Release"> <entryPointType>Qnx/Cascades</entryPointType> <platformArchitecture>armle-v7</platformArchitectu re> <asset path="arm/o.le-v7/HelloWorld.so" entry="true" type="Qnx/Elf">HelloWorld.so</asset> </configuration> <configuration name="Device-Profile"> <platformArchitecture>armle-v7</platformArchitectu re> <asset path="arm-p/o.le-v7-g/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> </configuration> <configuration name="Simulator-Debug"> <platformArchitecture>x86</platformArchitecture> <asset path="x86/o-g/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> </configuration> <invoke-target id="info.noip.darkportal.HelloWorld"> <invoke-target-type>card</invoke-target-type> <invoke-target-name>HelloWorld</invoke-target-name > <icon> <image>icon.png</image> </icon> </invoke-target> <!-- Unique author ID assigned by signing authority. Required if using debug tokens. --> <!-- <authorId>ABC1234YjsnUk235h</authorId> --> <initialWindow> <autoOrients>true</autoOrients> <systemChrome>none</systemChrome> <transparent>false</transparent> </initialWindow> <!-- The icon for the application, which should be 114x114. --> <icon> <image>icon.png</image> </icon> <asset path="icon.png">icon.png</asset> <asset path="assets">assets</asset> <!-- Locale support --> <asset path="translations" dest="qm"> <include name="*.qm"/> </asset> <!-- Request permission to execute native code. Required for native applications. --> <permission system="true">run_native</permission> <permission>access_internet</permission> <env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/> </qnx>
I tried to place invoke-target-type with 'application' but nothing changed, i still dont see the app on the sharing list.
03-23-2014 12:40 PM
Okay so you have nothing in there telling the OS under what conditions your app should be invoked.
Have a look at the second half of this document to get a better understanding of how to get your app on the invocation menus of other apps, including the share one.
03-23-2014 12:50 PM
This may help you as well, this is an example I use in my cookbook.
<invoke-target id="biz.stok.stokCookbook"> <invoke-target-type>application</invoke-target-typ
e> <icon><image>icon.png</image></icon> <filter> <action>bb.action.VIEW</action> <action>bb.action.SHARE</action> <action>bb.action.OPEN</action> <mime-type>*</mime-type> <property var="uris" value="http://www.stok.biz,http://m.stok.biz" /> </filter> </invoke-target>
Do be careful with your filters.
03-23-2014 01:47 PM
Thank you so much, it works after i put in the filter (action and url prefixes) ! However, if i change invoke-type from 'application' to 'card' the icon is gone from the share menu again. In term of declaration on bar-descriptor, the documentation said both 'application' and 'card' are supported, how come it does not work with 'card'?
03-23-2014 05:28 PM