Windows 8 tablet...what are my options?

146 views
Skip to first unread message

Marc Widdowson

unread,
Jan 27, 2014, 4:00:57 PM1/27/14
to codenameone...@googlegroups.com
I have an app done with Codename One that I have deployed to Android and iOS. Now I want to deploy it to a Lenovo Thinkpad Tablet 2, running Windows 8. 

There seem to be several options but I can't get any of them to work. 

I have got NetBeans 7.4 installed and working on the tablet, so I could presumably rewrite my app as an ordinary Java application and run the JAR file. However, I need to access the device's location services and I don't see any way to do this in standard Java. I included the Codename One JARs as libraries and used LocationManager but while that compiled, I got a NPE for LocationManager at runtime. So that approach seemed no good.

I used Codename One to build the app for Windows Phone. This gave me a .xap file. I clicked on the link and downloaded the file. I then tried to open the file and got "How do you want to open this type of file?" It suggested looking for an app in the Store, which then suggested mZIP and Build it Beta, neither of which seemed promising. I also got a message saying "Internet Explorer blocked content with security certificate errors" (which may or may not be relevant...IE seems to find certificate errors with a huge array of sites, including Google). So that approach seemed no good either.

I used Codename One to build the app for J2ME. This gave me a .jad file. I clicked on the link and downloaded the file. However, I got the same results as for the .xap file. Windows did not recognise this and suggested looking in the Store, which came up with some seemingly irrelevant apps. I also got a message "Internet Explorer blocked content with security certificate errors". So this approach also seemed no good.

My questions are: (1) is there any way I can compile my existing Codename One to run on a Windows 8 tablet; (2) or is there any way I can access location services on a Windows 8 tablet from Java?

Shai Almog

unread,
Jan 28, 2014, 12:02:59 AM1/28/14
to codenameone...@googlegroups.com
You can use a desktop application since most Windows tablets are just PC's: http://www.codenameone.com/how-do-i---create-a-desktop-application-with-codename-one.html

Marc Widdowson

unread,
Jan 28, 2014, 4:07:33 AM1/28/14
to codenameone...@googlegroups.com
Thank you very much. That sounds great. I will update to a Pro account and do that. I have a couple of questions: (1) I don't see the Desktop Build options at the moment, even though I both edited my project properties and started a new project...will those appear once I have upgraded to a Pro account? (2) Will the desktop application be able to access the GPS/location services on the tablet?

bles...@mfactory.mobi

unread,
Jan 28, 2014, 5:16:52 AM1/28/14
to codenameone...@googlegroups.com
Answer to question 1: Ensure you have latest Codenameone plugin (released 21 January 2014):


Create a new Codename one project (to ensure you have latest build files). 

If you are a Pro user you should be able to send Desktop build, tried myself.

Marc Widdowson

unread,
Jan 28, 2014, 6:12:59 AM1/28/14
to codenameone...@googlegroups.com, bles...@mfactory.mobi
Thank you very much...updated the plugin and now I get the desktop options...I didn't realise I needed to update

Shai Almog

unread,
Jan 28, 2014, 3:21:57 PM1/28/14
to codenameone...@googlegroups.com, bles...@mfactory.mobi
The options should appear to everyone in the current plugin but a build will only succeed for pro users.
GPS will not work since this is pretty much the simulator without the skin set to tablet mode. You can use native interfaces to call JavaSE and then access GPS hardware from there although I'm not sure if the GPS hardware is even accessible from Java SE.

Marc Widdowson

unread,
Jan 29, 2014, 4:36:33 AM1/29/14
to codenameone...@googlegroups.com, bles...@mfactory.mobi
Ok, thanks. I upgraded to a pro account, made the Windows desktop build and installed it ok on the tablet. I didn't get as far as testing the GPS because of unrelated issues. But you tell me it wouldn't work anyway. It sounds as though I am thrown back on whatever I can do with ordinary Java. I see someone has produced a Java GPS library, so I will investigate that.
Reply all
Reply to author
Forward
0 new messages