Author Topic: [DEV] - (DEPRECATED) Locus Data API (BETA)  (Read 18272 times)

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9909
  • Thanked: 50 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [DEV] - Locus Data API (BETA)
« Reply #30 on: December 21, 2011, 10:03:41 »
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 ... ;)
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9909
  • Thanked: 50 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [DEV] - Locus Data API (BETA)
« Reply #31 on: December 22, 2011, 09:09:30 »
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
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9909
  • Thanked: 50 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [DEV] - Locus Data API (BETA)
« Reply #32 on: December 27, 2011, 18:37:56 »
martin, current market version can work correctly now and also include new "Pick location" feature ;)
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Martin2

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: [DEV] - Locus Data API (BETA)
« Reply #33 on: December 27, 2011, 21:21:37 »
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!
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9909
  • Thanked: 50 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [DEV] - Locus Data API (BETA)
« Reply #34 on: December 27, 2011, 21:25:51 »
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
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Martin2

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: [DEV] - Locus Data API (BETA)
« Reply #35 on: December 29, 2011, 21:44:29 »
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?" )
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9909
  • Thanked: 50 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [DEV] - Locus Data API (BETA)
« Reply #36 on: January 02, 2012, 00:12:00 »
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?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Martin2

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: [DEV] - Locus Data API (BETA)
« Reply #37 on: January 02, 2012, 09:01:50 »
Quote
about "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.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline wrygiel

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: [DEV] - Locus Data API (BETA)
« Reply #38 on: February 08, 2012, 01:48:59 »
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?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9909
  • Thanked: 50 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [DEV] - Locus Data API (BETA)
« Reply #39 on: February 08, 2012, 06:08:40 »
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
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline wrygiel

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: [DEV] - Locus Data API (BETA)
« Reply #40 on: February 08, 2012, 13:27:43 »
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).
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9909
  • Thanked: 50 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: [DEV] - Locus Data API (BETA)
« Reply #41 on: February 08, 2012, 13:30:12 »
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 ...
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline berkley

  • Premium
  • Master of Locus
  • ****
  • Posts: 900
    • View Profile
  • Device: 1+1, N7
Re: [DEV] - Locus Data API (BETA)
« Reply #42 on: February 08, 2012, 19:19:18 »
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
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
 

Offline wrygiel

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: [DEV] - Locus Data API (BETA)
« Reply #43 on: February 09, 2012, 05:54:25 »
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.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline Sputnik

  • More than Newbie
  • *
  • Posts: 16
    • View Profile
Re: [DEV] - Locus Data API (BETA)
« Reply #44 on: March 23, 2012, 14:09:33 »
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 ?   :)

Code: [Select]
          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();
            }
  }
« Last Edit: January 01, 1970, 01:00:00 by Guest »