[DEV] - (DEPRECATED) Locus Data API (BETA)

Started by Menion, July 01, 2011, 00:54:41

0 Members and 4 Guests are viewing this topic.

Menion

#30
quite a lot of requests. About unique name ... you're using method that import some file ... for this, is not possible (and will not be) to set some unique values on data. Anyway as Points have now own system for posting to Locus, same will be done also for tracks, so then will be possibility to update already existing track.

and lot of other things ... I also don't know what all can be possible with intent system, but we'll try ... ;)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Menion

#31
so,
 - new commit is on web ... here http://code.google.com/p/android-locus-map/ (if you don't know)

 - testing version is attached!

only one think before you'll test. In commited version is check for locus version before call. It's file DisplayData, line 245 "return sendData(context, intent, callImport, 64, 125);", so here, you need to reduce numbers to 63, 124. This will allow use "send track" function also on testing version
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Menion

#32
martin, current market version can work correctly now and also include new "Pick location" feature ;)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Martin2

#33
Thank you, it works, but...

If I select a point then Loucs intent ON_LOCATION_RECEIVE always starts a new activity and calls onCreate in my addon. All the internal state of my activity is reset after every point selection. Currently the only solution I see is to persist the state of my activity. I tried to use startActivityForResult like described at http://developer.android.com/reference/ ... Activities but it doesn't work - onActivityResult is never called. Could this be implemented too? Or do you recommend me to use different approach to remember internal activity state (in my case the list of already selected points)?

Thanks in advance!
  •  

Menion

#34
read please comment in code ... http://code.google.com/p/android-locus- ... s.java#188

EDIT: if not clear, I suggest to flag your activity with "singleTask" for this case
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Martin2

#35
Thanks, it works with singleTask! :-)

Another question: how to set the track to temporary when using DisplayData.sendData(this, track, false)? Currently it is neither temporary (hiding temp. items will not hide it) or listed in the track list.

( offtopic bugreport: when deleting track(s) it asks "Do you really want to delete null?" )
  •  

Menion

#36
ah thanks, only displayed track of course have to be handled by "Remove temp map items" ... fixed

about "null" in delete ... track is without name?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Martin2

#37
Quoteabout "null" in delete ... track is without name?
It has a name. Null will only appear if you first select one or multiple tracks with checkbox and use the right down button / delete.
  •  

wrygiel

#38
Couple of months ago I made a simple OpenCaching.PL plugin for Locus. It had a fair number of users and worked well, but stopped working ubrubptly after Locus was upgraded. I haven't touched my application in months, does this mean the API has changed?
  •  

Menion

#39
Hi,
  I cannot say now what exactly, but many changes was done and as I remember correctly, also one that unfortunately breaked backward compatibility. I noticed all addon developers that I know that have published addon on market. Don't know you have also one. So sorry for that, please update to last API version http://code.google.com/p/android-locus-map/, it will be simple process
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

wrygiel

#40
In my case it won't be so simple, because I am travelling for the next two months. I would have to install the whole development package somewhere. :-/ I will have to pray that most of my users won't update Locus in any time soon ;)

I haven't published it on the market. It was my first Android app and I didn't have any plans for future development, so it didn't seem right to put it on the market. No more than a 100 people use it (based on download count).
  •  

Menion

#41
OK, so how can I help ... hmm I can offer that if you send me code, I'll fix small issue that cause troubles and send you fixed code back. Anyway you'll still need to compile result and sign it by your key, so not much help from me. I'm sorry for that, damn ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

berkley

#42
Hi,

I do a lot of different things than standard developing in Java. Long story... Anyway, just as a small hint: I work on at least 3 different desktop pc's all using the same program which is installed in a dropbox directory. The key is located in the same directory. Everything I do while coding (in my case it is more some try-and-error-version of coding) gets synced to dropbox, so i can continue work on another desktop pc. This works also for compiling ;)
But I don't know, if this also works for standard Android SDK tools... Anyway, Good luck!

Cheers, berkley
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
  •  

wrygiel

#43
I also have these files on my dropbox :) What I don't have is Eclipse and Java SDK installed. Anyway, menion helped me with the fix (thanks!), now I have the APK and I only have to sign it. Internet connection in my previous hostel was awful, but I just changed hostels, so I think I will manage to do it through remote desktop connection of some sorts.
  •  

Sputnik

#44
Hi,

I'm new to Java so struggling a lot here. I am successfully sending points to Locus from a remote JSON source. Its great. I was hoping to be able to send a little additional data like Speed and Heading and time received. The Geocaching class? has a little too much specialised info/buttons.

This is what I have.   Would anybody be able to suggest a (simple!) way to attach this additional info.

Thanks.

P.S. I don't suppose there is anything built into the API for auto refreshing this content ?   :)

          PointsData pd = new PointsData("callSendMorePoints");

   // Getting Array of remote markers from server
   contacts = json.getJSONArray(TAG_CONTACTS);

   // looping through All Contacts
   for(int i = 0; i < contacts.length(); i++){
       JSONObject c = contacts.getJSONObject(i);

       // Storing each json item in variable
       String label = c.getString(TAG_LABEL);
       String lat = c.getString(TAG_LAT);
       String lon = c.getString(TAG_LON);
       String speed = c.getString(TAG_SPEED);
       String heading = c.getString(TAG_HEADING);
       String received = c.getString(TAG_RECEIVED);
       
      Location loc = new Location(TAG);

       ///convert from string to double
       double aDouble = Double.parseDouble(lat);
loc.setLatitude(aDouble);

///convert from string to double
double bDouble = Double.parseDouble(lon);
loc.setLongitude(bDouble);

/// Anyway to attach my speed and heading with this ?
                       Point mydata = new Point(label, loc);


pd.addPoint(mydata);
        }
       DisplayData.sendData(activity, pd, false);
       }
          catch (JSONException e) {
          e.printStackTrace();
           } catch (RequiredVersionMissingException e) {
// TODO Auto-generated catch block
    e.printStackTrace();
            }
  }
  •