It is currently 9 May 2025, 9:07 Advanced search

Native Mobile App for Android

Questions and answers on how to best use Instant Developer

Native Mobile App for Android

Postby asawyer13 » 18 November 2013, 20:13

I created a little test mobile app. It was setup to connect to a remote SQL Server Express database and in the IDE, the Test Connection works.

If I create and deploy this to the server, and run the app thru Caravel on Android, it works fine.

I am now trying to create an APK file and run it natively. I have created the APK file using Eclipse and copied the apk file to a real Android device, and installed it.

When I run it says:

The page at "http://0.0.0.0" says:
Impossible contattare il server dell'appicazione.
Premi OK per reprovare

Se il problema persiste, contatt l'assistenza technica.


I think I typed that all in correctly.
Can you tell me what I have done wrong?

Thanks
asawyer13
 
Posts: 137
Joined: 10 July 2013, 9:44

Re: Native Mobile App for Android

Postby g.lanzi » 20 November 2013, 9:07

Did you enabled the "offline" flag of the mobile app? It's disabled by default.
Giuseppe Lanzi
Director of Support services
Pro Gamma S.p.A.
User avatar
g.lanzi
Pro Gamma
Pro Gamma
 
Posts: 3504
Joined: 29 September 2010, 10:24
Location: Bologna

Re: Native Mobile App for Android

Postby asawyer13 » 20 November 2013, 10:06

Yes, I changed it and that didn't help.
By clicking on offline, does it automatically try to create local SQLite database and put data in it?
In this case I didn't really care if it stored any data locally and I did no coding to utilize offline that I know of.
I just wanted my test app to show my table from my server.
It's a simple little app, I can send it to you if you want to check it out.
It was just a little proof of concept app that I wanted to test on native Android and IOS.
It runs fine thru Caravel.
Alan
asawyer13
 
Posts: 137
Joined: 10 July 2013, 9:44

Re: Native Mobile App for Android

Postby asawyer13 » 20 November 2013, 10:27

I also did a recompile all but that didn't help.
asawyer13
 
Posts: 137
Joined: 10 July 2013, 9:44

Re: Native Mobile App for Android

Postby g.lanzi » 2 December 2013, 11:07

An offline app automatically creates the structure of the SQLite database at the first query performend, keeping it aligned in case of changes.

The apk solution is meant to be used with an offline app. If you want to use an online mobile app with the apk there are a few changes that have to be made. Go to:
- service.java and comment the line
webView.loadUrl("javascript:DesktopManager.prototype.HandleRedirect = function() { RD3_ShellObject.SendCmd("EXIT"); }");
- replace the address of the app in ViewController.java, it must be something like:
mainSvc.URL = "http://192.168.0.117:1308/MobileSolutionDemo/MobileSolutionDemo.aspx";

With our eclipse installation we are able to open a package and compile with no problem, with an offline app.
But every time you change the url of the installed app you have to uninstall it from the device, because the very first time its value will be stored and never replaced.
Giuseppe Lanzi
Director of Support services
Pro Gamma S.p.A.
User avatar
g.lanzi
Pro Gamma
Pro Gamma
 
Posts: 3504
Joined: 29 September 2010, 10:24
Location: Bologna


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 14 guests