Problems creating WhereYouGo from code

Started by charlenni, October 30, 2012, 08:47:55

0 Members and 1 Guest are viewing this topic.

charlenni

Hello,

I downloaded the copy from the repository and also OpenWIG. After building and starting the emulator, WhereYouGo runs and shows all cartridges on the sdcard. But if I want to start a cartridge, I get the following error: "java.lang.RuntimeException: set your DeviceID. ..." from OpenWIG. I take a look at the source of OpenWIG and in WherigoLib.java, the DEVICE_ID is set by "public static final String DEVICE_ID = "DeviceID";". But I know, that WhereYouGo have an own DeviceID. Where can I find it or what I am doing wrong?

Best regards
Dirk (Charlenni)
  •  

Menion

#1
hello,
  check WherigoLib.java around line 133. This is what I have in code ... (in OpenWIG library)

public static void register(LuaState state, String deviceId) {
env.put(DEVICE_ID, "WhereYouGo");
if (env.get(DEVICE_ID) == null)
throw new RuntimeException("set your DeviceID! WherigoLib.env.put(WherigoLib.DEVICE_ID, "some value")");

- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

charlenni

#2
Thank you very much for your answer.

I see, you patched the OpenWIG code to get the right DeviceId. Did you know, if I had to patch other things in OpenWIG? Started a cartridge, and it runs, but not sure, if I had to check other things.
  •  

Menion

#3
nono, that's all. I forget to mention this somewhere. It's the only thing, that you have to do before using OpenWIG library
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

charlenni

#4
I have again a question: I found in play.google.com, that WhereYouGo needs Android 1.6. If I compile the code with API 4 (Android 1.6) I get some errors (MATCH_PARENT could not be resolved, killBackgroundProcesses(String) is undefined). If I search for killBackgroundProcesses(), I found, that this function is from API 8 (Android 2.2). Now my question: do I have at least to use API 8 to compile WhereYouGo?
  •