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

BlackBerry Push Development

Reply
Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

Please begin a new thread, your questions seem to waver from the original poster's.
Garett
@garettBeuk
--
Goodbye everybody!
Contributor
komutel
Posts: 16
Registered: ‎09-17-2012
My Device: Blackberry Q10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

Ah, I just realized that I had to unzip the jar file to get the source code

Contributor
komutel
Posts: 16
Registered: ‎09-17-2012
My Device: Blackberry Q10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

Are the username and password required? or is it optionnal? If it's required what am I trying to enter here?

Contributor
komutel
Posts: 16
Registered: ‎09-17-2012
My Device: Blackberry Q10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

Nevermind that last post, I was checking the wrong url

Contributor
komutel
Posts: 16
Registered: ‎09-17-2012
My Device: Blackberry Q10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

So if I understand correctly, there are 2 steps in registering. First, you send a request to a url with your app id, BB os version and model and then you receive a response. Then you send another request to the same url, but with that response you got from the first.

 

So basically I was trying to type the link in my BB browser. So I guess I can't "see" that response this way?

Contributor
komutel
Posts: 16
Registered: ‎09-17-2012
My Device: Blackberry Q10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

I've implemented the sample app registration code into my own app and there's a part where it just seems to do nothing at all. No error nothing.

 

In RegisterCommand

 

    protected void execute() throws Exception {
        //ContentProviderProtocol.performCommand( ContentProviderProtocol.CMD_SUBSCRIBE, username, password, isEnterprise, tx );
        // if the registration is successful we register with BPS
        try
        {
            BpasProtocol bpasProtocol = (BpasProtocol) PushLibFactory.getBpasProtocol();
            bpasProtocol.register( tx, isEnterprise );
        } catch (Exception e)
        {
        	System.out.println(e.getMessage());
        }
        // update the registered state
        PersistentStorage.setRegistered( true );
    }

 

The part that seems to do nothing at all is 

BpasProtocol bpasProtocol = (BpasProtocol) PushLibFactory.getBpasProtocol();

 

I'm using PushLib50 since i'm on a 5.0 ++ device

 

I even tried to try/catch and it doesn't do anything. It doesn't even go on after. Is there anything i'm missing?

Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

I would recommend using the pre-5.0 library, the 5.0+ library seems to cause some issues.

 

With the below issue, have you tried debugging? Does this line hang?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
komutel
Posts: 16
Registered: ‎09-17-2012
My Device: Blackberry Q10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

Ok i'm using the lib 43 now and it does the same thing. Yes i'm in debug mode. When I step into that line I get in PushLibFactory that creates a new PushLib43 and then I can't step over or step in anything it just goes in some thread and does absolutely nothing.

 

My breakpoint in 

 

    public static BpasProtocol getBpasProtocol() {
        return (BpasProtocol) lib;
    }

 is never called.

 

I tried to replace 

 

BpasProtocol bpasProtocol = (BpasProtocol) PushLibFactory.getBpasProtocol();

 With :

 

BpasProtocol bpasProtocol = (BpasProtocol) new PushLib43();

 and when I catch the error it says : "application already running in this process" which sounds EXTREMELY improbable. 

Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

Ok, a few questions:

1) Did you make any modifications to the original sample application?

1b) If you did, what were they and did you uninstall the original application before trying the modified version?

2) Are you testing this on a real device or simulator?

2b) If a real device, does it have a BIS data plan?

3) What SDK version did you use to compile?

4) What is the full OS version of the device being used for tests?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
komutel
Posts: 16
Registered: ‎09-17-2012
My Device: Blackberry Q10

Re: http://pushapi.eval.blackberry.com/mss/PD_subReg - connection timeout

1) I integrated it in my app because the "sample" doesn't have a project file and I couldn't get it to compile

1b) I uninstalled the original app and the only thing I changed is in my post above. 

2) Real device

2b) Yes

3) Push SDK? The one i've been told when I registered for Push : https://developer.blackberry.com/services/push/?CPID=PUSHAPI00 

It says it's 1.1.0 on the page but when I download it it's 1.1.0.16

4) 6.0 Bundle 2921 (v6.0.0.666, Platform 6.6.0.241)

 

It's a BB Bold 9780