Giter VIP home page Giter VIP logo

openwig's Introduction

c:geo

c:geo is an open-source, full-featured, always ready-to-go client for geocaching.com (unofficial). It also offers basic support for other geocaching platforms. It does not require a web browser or exports - just download and start right away.

Want to contribute?

Perfect! Please tell us in the issue tracker before hacking on your great new feature. It would be bad for you to have implemented something great but we can't include it because it doesn't fit the existing architecture and code.

Starting points for contribution

You can also take a look at the project page of our repository. We have a list of good first issues, that might be suitable for your first contribution, and a collection of high priority issues.

Project status

Build Status
Codacy Badge
Crowdin

Get the source

Fork the project source code, make changes to your clone, and create a pull request afterwards.

Note: make sure to really fork the source code, do not just clone the main c:geo repository. Then work locally with a clone of your fork. Otherwise you won't be able to bring your changes into c:geo later. If you are a github / git beginner and don't know what this means, consult our git/github setup page for beginners.

Branches

  • master is for the development of new features. Nightly builds are created from this branch.
  • release is for all bug fixes of already existing features. So if a bug is reported in a released version, it should be fixed on this branch (and merged to master afterwards).

Note: Regular merging of release to master (after changes have been done on release) is highly recommended to avoid unnecessary merge conflicts later on.

A more complex bugfix can first be tested against the master branch and integrated in the nightly builds while kept compatible with the release branch for a later integration. Such a procedure is described in the wiki.

Setting up an IDE

The standard IDE for Android projects is Android Studio, which is based on IntelliJ IDEA. We use it for the development of c:geo.

Details for setting up the IDE are described in the wiki (https://github.com/cgeo/cgeo/wiki/IDE).

Build

Prerequisites

  • Android SDK (latest version) including Google APIs (at least) V26, Google repository, and Android support repository. (File => Settings, Appearance & Behaviour => System Settings => Android SDK, Check "Show Package Details" on "SDK Platforms" tab and check subpackages as needed.)
  • If you use Microsoft Windows, Google USB Driver to install the application on the smartphone.
  • You need to provide several API keys for compiling the app (see following sections for details).

API keys

For the full usability of c:geo you need some API keys for Google Maps and the opencaching sites. You can leave all entries in the configuration empty, but Google Maps and the Opencaching sites will not work.

For using the Google Maps function, it is necessary to have a Google Maps API v2 key. For this, follow

The key itself is free and you don't have to enter any credit card info (although the web form seems to force you to).

To be able to use Google Maps you need to use a Google API-enabled image, so make sure to select the right image for your emulator/device, otherwise Google Maps won't be offered as a map provider in c:geo.

Request your personal API key for the various OpenCaching sites we support. If you leave these blank, those networks will remain disabled.

To obtain an API key for geocaching.su you need to request access from administration. Keys are generated manually on request.

API keys installation

For c:geo we have a semi-automatic configuration:

  1. Copy ./templates/private.properties to ./
  2. Edit private.properties with your keys
  3. The ./main/src/main/res/values/keys.xml is created on the gradle build and filled with the data from private.properties

The third point works only if the file keys.xml does not exist. When changing your API keys, you have to delete the keys.xml file.

If you want to fill the keys.xml by hand, copy ./main/templates/keys.xml to ./main/src/main/res/values/, then edit the copied keys.xml. For each key, replace the value starting with @ and ending with @ (inclusive) with the key. If a key is missing, remove the value and the leading and trailing @.

Building with gradle

Run gradlew from the root directory of the git repository. That will install the necessary build framework and display how to build c:geo. gradlew assembleBasicDebug might be a good start. Alternatively you can use "make" in Android Studio ("Build" => "Make Project").

To be able to create an installable Android package (APK), you need to create a signing key first. In Android Studio go to "Build" => "Generate Signed Bundle & APK", select "APK", and follow the instructions. You will create a key storage and a project-specific key. Enter path and access information to those in file cgeo/private.properties.

Testing

The Test classes can be found in the project test. Test classes should be located in the same package as the class under test. Every class can be run with Run '<class name>' or debugged with Debug '<class name>') as an Android JUnit Test. To run all tests use the same Run 'Tests in <package name>' menu item from the context menu of a package in the test project.

For tests to run successfully you need to configure c:geo on the emulator that runs the test with a valid geocaching.com account. In order for all tests to be successful the account needs to be a premium member.

Tests may also be launched from the command line. Use gradlew assembleBasicDebug from the root directory of the git repository.

Deploying the app locally for testing purposes

Android Studio needs to be configured for which device(s) c:geo will be deployed to. Use "run" => "run" (2nd entry with this heading). You can create several profiles for a physical device attached via USB, as well as virtual devices that are run in an emulator. (If the emulator is not installed yet, do so via File => Settings, Appearance & Behaviour => System Settings => Android SDK, tab "SDK Tools", check "Android Emulator", and apply.)

License

c:geo is distributed under the Apache License, Version 2.0.

This product includes software developed by the c:geo team and contributors as well as parts developed elsewhere. See the references in main/src/main/res/values/strings_not_translatable.xml for details (or "about: contributors" page in the app).

Contact

openwig's People

Contributors

bekuno avatar biylda avatar lineflyer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

bekuno loicb martl

openwig's Issues

RuntimeException when loading a saved game

After saving a game (regardless whether to a save slot or normal) and restarting with a saved game following rror message gets displayed:

2020/04/02 18:19:03
[WUI] showError(you hit a bug! please report at openwig.googlecode.com and i'll fix it for you!
java.lang.RuntimeException: attempted index of non-table: null

stack trace: at @E:/webtempfiles/1d57e8f5-d1a5-4892-9b83-50b0c4c06716/_cartridge-new.enc:1244)

Reproduce as follows:

  • quit a cartridge
  • save the game
  • restart the cartridge
  • load from saved game

The messages is displayed every time a cartridge is started from a saved game. It is dsplayed only a short fraction of a second but is still displayed when you quit the cartridge. The message is generated in cz.matejcik.openwig.Engine.stacktrace().

I think it originates from Engine line 210 when calling restoreGame(). I don't think restoreGame does throw an IOException, as this would have resulted in a different message.

WhereYouGo version 2020.03.08

Crash - Tried to call nil

Reported on support mail:

Bug report for you. This is the most ambitious and maybe one of the more sophisticated wherigo cartridges I've come across. Naturally, that means it's also prone to crashes and other malfunctions.

Coree Clamber
https://coord.info/GC1KHW3

https://www.wherigo.com/cartridge/details.aspx?CGUID=0b8e7940-7a39-408f-83a1-411f3d948d96

I have a couple screen shots with crash reports (I'll forward them if you think you really need them), but for the time being I'll leave it with you to have a poke around. You should have no trouble finding the source of the errors, not least of which is a reliance on altitude.

For what it's worth, this particular wherigo involves a long hike in some pretty hairy places. I ran the cartridge using a GPS emulator in the hope of extracting the 14 waypoints (for safety sake) but because my phone does not handle altitude it was no help. Still, I think this one might be worth your time to strengthen your already solid program.
Screenshot_2020-11-23-12-26-04

saveAnalyzer should be checked

It is not clear what saveAnalyzer is for and if it is working.
This means we need at least a readme and a function test.

NullPointerException

java.lang.NullPointerException: Attempt to read from field 'cz.matejcik.openwig.Cartridge cz.matejcik.openwig.Engine.cartridge' on a null object reference.

Message kept appearing immediately after pressing Ok. Had to close WhereYouGo app to remove.

Error message also referred to reporting at openwig.googlecode.com but that led to a 404 error.

Set license to GPL v3

see cgeo/WhereYouGo#42 (comment)

Lineflyer :

Would you be fine with GPL v3. In this case we have just the same license as WhereYouGo itself, which might make sense a bit easier?

matejcik :

Yes, absolutely. My licence is "GPL v2 or higher", so GPL v3 is applicable directly.

remove all "historic" content

As recommended by @matejcik in
cgeo/WhereYouGo#42 (comment) :

There are three major projects in the repository:

mobile is the original J2ME OpenWIG application
DesktopWIG is a J2SE desktop GUI app
OpenWIGLibrary is the common part, which is the only thing used in WhereYouGo
droidwig is something like "i tried to write an Android app years ago", before menion actually did one;
OpenWIGTester is something like a runner for logs, or for savefiles, something or other, mostly a debugging tool. You don't need it.
kahlua things are linked from the kahlua2 repository, and are there only for ease of building. You will need to set up build so that the kahlua2 jar(s?) is (are) accessible, but perhaps Gradle can do that for you. In any case you do not need any actual content of these directories.

I see no reason for you to continue development on the J2ME app or the desktop GUI app. I don't think the J2ME app even builds today, without downloading 10 year old toolchains.

So OpenWIGLibrary is the only thing that you need.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.