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: 2
Registered: ‎05-12-2014
My Device: Z10
My Carrier: NULL

How to set proxy for BB10 native app?

Hi, 

 

I want to set proxy for native app on BB10, which could enable me to capture native app's requests by using tool like charles proxy. (I am a mobile app QA, I need to check whether our app sent correct requests.)

 

While the proxy setting provide BB10 itself seems only applies to browser not native app.

 

Any thoughts? Please help!

 

 

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

Re: How to set proxy for BB10 native app?

welcome to the support forums.

you should be able to use QNetworkProxy and its static method setApplicationProxy
----------------------------------------------------------
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
New Developer
Posts: 2
Registered: ‎05-12-2014
My Device: Z10
My Carrier: NULL

Re: How to set proxy for BB10 native app?

Thanks for your reply.

 

However, the code cannot be changed in my situation. what I have is only a BAR file.

I am looking for tools like ProxyDroid in Android world, which could help to set global proxy (applies to both network from browser and native application).

 

Do we have anything like that on BB10 world?

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

Re: How to set proxy for BB10 native app?

no, i don't think there is an API for that, so there won't be an app that handles this.

you could use the work perimeter to get a network tunnel, but only on enterprise devices.

----------------------------------------------------------
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
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: How to set proxy for BB10 native app?

The other option is setting a proxy for your wifi connection, but that would make every network call go over that proxy.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker