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

Java Development

Reply
Developer
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer

Re: Push Service in App

Any reply??

 

I am not getting how do i use this credentials in my app?

Please use plain text.
Developer
simon_hain
Posts: 15,956
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Push Service in App

did you check out my simplified sample?
http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Simplified-BIS-Push-client-sample...
----------------------------------------------------------
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
Please use plain text.
Developer
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer

Re: Push Service in App

The URL saye item not found

Please use plain text.
Developer
simon_hain
Posts: 15,956
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Push Service in App

sorry, looks like i found the internal url instead, use this one:
http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Simplified-BIS-Push-client-sample...
----------------------------------------------------------
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
Please use plain text.
Developer
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer

Re: Push Service in App

Thanks for the reply Sir

 

I just want to ask 2 things:

1)Do i have to install Push Service SDK ?

2)I am running the application on device having wifi connection,so the push service will run or not?

Please use plain text.
Developer
simon_hain
Posts: 15,956
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Push Service in App

1) the push service SDK is used to develop a server-side app. you can use push without it just fine.
2) yes, as long as the device is BIS connected (which works over wifi)
----------------------------------------------------------
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
Please use plain text.
Developer
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer

Re: Push Service in App

Sir

I have created a new Project and added the two classes in my application.

I have also added the push port and application id that i got from my conformation mail.

 

Now the url in BPAS_URL=":http://pushapi.eval.blackberry.com";

I have to change this url?

 

And what to i have to put in my main App class constructor??

public UiApp()
{
// here?
}
public static void main(String args[])
{
UiApp app = new UiApp();
app.enterEventDispatcher();
}

Please use plain text.
Developer
simon_hain
Posts: 15,956
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Push Service in App

if you have productive credentials you should change the eval url to the productive url you should have received by mail.

you have to adjust your application structure so that it registers the push at startup. i would recommend an autostart alternate entry point.
see
http://supportforums.blackberry.com/t5/Java-Development/Set-up-an-alternate-entry-point-for-an-appli...
----------------------------------------------------------
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
Please use plain text.
Developer
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer

Re: Push Service in App

Sir I don't want to add the alternate entry point for my app.

Then how do i add this into my application?

 

I am confused..What to add in my main function class's constructor???

SplashScreen is the first screen which should be visible when my application gets open.

So, in constructor what i have to add splashscreen or the thread which performs the message reading task? 

public UiApp()

{

}

 

public static void main(String args[])

{

UiApp app = new UiApp();

app.enterEventDispatcher();

}

Please use plain text.
Developer
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer

Re: Push Service in App

One more problem 

 

if (!CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_BIS_B))
{
System.out.println("Error: Coverage not sufficient");
return;
}
if (DeviceInfo.isSimulator())
{
System.out.println("Error: Registration can only be done for real devices");
return;
}

 

I am always getting Error: Coverage not sufficient though net is working fine.

I am using Wifi

Please use plain text.