Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 20
Registered: ‎07-21-2013
My Device: Q10
My Carrier: VZW

Quite frustrated, please help me know if my app is even possible in 10.2

My goal is not to just complain, but to see if there is any way to salvage 3-4 weeks of (seeming) wasted effort.

 

I am a very experienced developer and, among other things, have years of c++ and QT experience outside of BB10. I am new to BB10. I read a bunch of docs and concluded that the app I wanted to build was maybe possible in 10.1, and definitely possible in 10.2.

 

Now that 10.2 gold is out, without any docs or idea what "Hub Integration" actually means, it seems my app simply can't be built on Blackberry 10. I am willing to change quite a bit about the app to find a way to make it work. All I was trying to build was as close to native integration with Google Voice as possible.

 

What I really wanted: to replace the native dialer with a VOIP one (libjingle-based) via google talk/xmpp/jingle, and to have a "Google Voice" account type in the Hub for both text messages and calls. Once I realized the bb10 OS would never allow intercepting outgoing calls, I came up with compromises. The bb10 invocation framework is more powerful than Android's intents on paper only; in practice, all of the useful things I have tried to do have failed. I basically wanted to make a GrooveIP for bb10, which is impossible.


What I thought I could settle for: a headless long-running app that adds a ton of invoke targets for contacts, phone numbers, text messages, etc., allowing the user to long-press on any such item in the Hub, Phone, and Contacts apps and choose "Call with Gvoice" or "Text with Gvoice". It's an extra step, but it's clear for the user and prevents me from making any real UI. I would much prefer to never make my own address book or dialer or such, and use only the builtin ones, which this approach would allow. According to the docs (https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/menus.html... this should have been possible. Unfortunately the docs are wrong or critically incomplete: http://supportforums.blackberry.com/t5/Native-Development/How-to-add-your-own-actionitem-to-platform... 

 

What I built: Since I mistakenly trusted the docs, I make a newbie mistake and decided to build a bunch of the business logic and test it before wiring up the (small and simple) UI. I made a few elegant classes that automate authentication to google and calls to google's (undocumented and not exactly public) voice AJAX APIs. I next got code working to find the google voice mapping number for any phone number, and add it to any bb10 contact. I then added a bunch of invoke targets (and actually burned at least a week getting these right; the documentation could use about 5x as many examples here), and eventually found that native apps just ignore 3rd-party invoke targets (something I did not see documented anywhere, and I searched quite long and hard).

 

The theory was that the first time any contact texted or phoned (in or out) via a google voice mapping number, I would save it to that contact under a special label. Then if you long-pressed on any non-gvoice-mapped number in the Hub/etc., and chose "Call with gvoice", I would check for a mapping number, if not found, looking it up, save it in the contact, and call the mapped number. All the google-related parts are working for me, but few of the bb10 parts.

 

The question: Please, is there any way to save my app? Is there any way at all to have some sort of native integration for a third party app in the native apps (Hub, Phone, Contacts)? In the beginning I was just going to spend a week making this for myself, since the only thing I miss on my q10 from iOS/Android is better google voice. On Android it's easy with GrooveIP or similar, on iPhone it's easy with a jailbreak or by using Sprint. The Sprint integration is the same for Blackberry phones, but I now have a real need for Verizon's vastly superior LTE coverage in my day job (where I spend a lot of time using SSH on the road in a moving vehicle, which is only feasible on LTE).

 

Then when it turned into a month, I figured I would release it on AppWorld just so more people could benefit from the effort and give bb10 a potentially "killer feature" for the platform.

 

Now I just want to find any way at all to make something close to the original goal so I can use my phone with less pain and put this cursed project behind me.

 

Please, only respond if you have concrete insight or useful ideas/feedback (as in, you either work for Blackberry or are an experienced BB dev). I have already read literally the entire set of documentation on Cascades for 10.0 - 10.2, and built and read through every single example app in the repo.

Developer
Posts: 16,786
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Quite frustrated, please help me know if my app is even possible in 10.2

adding the action items should work fine, it is just not possible at runtime (this was the issue in the thread you linked) as it is defined in the bar-descriptor.xml.

there is no real hub integration (like your own account type), you can only add the non-typed notification with the bell symbol.

Maybe you can specify what invocations you need specifically. The app sounds really neat, let's get it reality.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Highlighted
New Developer
Posts: 20
Registered: ‎07-21-2013
My Device: Q10
My Carrier: VZW

Re: Quite frustrated, please help me know if my app is even possible in 10.2

[ Edited ]

Thanks for the reply! I think the first questions may actually be a bit higher-level:

 

  1. Do native apps like the hub even use the InvokeQuery system to populate their context menus? It appears they do not, or if they do, they have some arbitrary hidden "native-only" flag set to filter the responses.
  2. If they do, what mime-type/url/filter combos would work for showing up in native app menus? I have tried hundreds of permutations, all of which show up to the InvokeClient sample, and none of which show up in the hub/phone/contacts.

You can see a couple of my experimental samples in the thread at http://supportforums.blackberry.com/t5/Native-Development/Add-entry-to-platform-context-menu/m-p/252...