11-15-2012 01:52 PM
Hello!
I already can package my app with ripple, I signed my app and run into the simulator(bb curve 9300 phone)...all is ok the icon, the splash screen and works ok....but my problem is because my app(html5 website) work with a mysql all my files are in .php...so I need to know..
How can I run my app with these type of extension and connect to my remote server database?
I rreally hope that someone can give me a hand with it...
Best Regards!
Joaquin Vides
11-15-2012 02:46 PM
11-15-2012 04:34 PM
11-16-2012 11:26 AM
You should probably look at creating a web service on the hosted external website.
Reasons:
1. You shouldn't expose your database to apps not hosted on your server - I mean your allowing devices to connect directly to the MySQL data.
2. If things need to change in the schema of the database you can do that without cutting users off by shaping your web service to the old.
11-19-2012 03:07 PM
ok, I make it different because BB don´t support .php...
so I put in eclipse the BB sdk and find this code...
import net.rim.device.api.browser.field2.BrowserField;
import net.rim.device.api.browser.field2.BrowserFieldConf
import net.rim.device.api.io.transport.ConnectionFactory;
import net.rim.device.api.io.transport.TransportInfo;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
class Main extends UiApplication
{
private MainScreen screen;
private BrowserField bf2;
private BrowserFieldConfig config;
private ConnectionFactory factory;
public Main()
{
factory = new ConnectionFactory();
factory.setPreferredTransportTypes( new int[] {
TransportInfo.TRANSPORT_TCP_WIFI
});
factory.setDisallowedTransportTypes(new int[] {
TransportInfo.TRANSPORT_TCP_CELLULAR,
TransportInfo.TRANSPORT_WAP
});
factory.setAttemptsLimit(10);
factory.setConnectionTimeout(10000);
factory.setTimeLimit(10000);
config = new BrowserFieldConfig();
config.setProperty(BrowserFieldConfig.CONNECTION_F
bf2 = new BrowserField(config);
screen = new MainScreen();
screen.add(bf2);
pushScreen(screen);
bf2.requestContent("http://www.google.com");
}
public static void main(String[] args)
{
Main app = new Main();
app.enterEventDispatcher();
}
}
I suppose working..... in the simulator open the app but give me this error
the url: could not select proper transport descriptor for: the url in question
so I think is because I don't put the whitelist...and I don´t know where I need to put it...can you give me a clue?
Best Regards
Joaquin
11-19-2012 05:36 PM
11-19-2012 09:53 PM
hello oros, thank you for your support!
yes with the native browser I can even see my mobile website, but with the app can not...
yes I know the code:
11-20-2012 11:50 AM
Hi Joaquin,
That code would go in your config.xml document. The config.xml document exists at the root of your project and contains identifying information about your application:
https://developer.blackberry.com/html5/documentati
Also, please note that the WebWorks plug-in for Eclipse hasn't been supported in quite some time; while you can still use Eclipse as an editor, the actual packaging of the applicatoin be being done through Ripple or the command line, using the most up-to-date WebWorks SDK. Information on packaging is also available at the URL above.
11-20-2012 11:52 AM
Sorry, I was a little confused.
Just to clarify, are you making a Java applicatoin (i.e. the BrowserField source code you posted) or a WebWorks application (i.e. HTML5 packaged applicatoin.) The <access> element is only applicable to WebWorks applications.
In a Java application, you don't need to perform the same whitelisting.