Giter Site home page Giter Site logo

Comments (8)

davidgyoung avatar davidgyoung commented on September 8, 2024

@jessolo, you are correct about the code flaw above but also that it is not causing the stack trace you mention.

I wonder if there is something special about your setup that is causing it to not find that file. Are you using the aar file with Android Studio (if so what version?) or the tar.gz file imported as an Android Library Project in Eclipse?

from android-beacon-library.

jessolo avatar jessolo commented on September 8, 2024

I am using the whole project as a library project. Converted from gradle to ant. I am not using the tar or the aar file. I am having the file in the assets folder. So it does not read from assets. If it loads from web and stores into the data directory, it does not read from the path.

from android-beacon-library.

davidgyoung avatar davidgyoung commented on September 8, 2024

This sounds contradictory: "I am having the file in the assets folder. So it does not read from assets." can you please explain? The code is throwing an exception because it cannot find the built-in json file.

from android-beacon-library.

jessolo avatar jessolo commented on September 8, 2024

As per the loading flow

  1. It tries to load from File from the path /data/data.... It does not find it, so throws a Runtime exception -- App Crashes. Moving to assets was a workaround. But it will not work.I am now not having the file from assets. When RuntimeException is thrown beacon service does not startup.It does not try to load from web.

from android-beacon-library.

davidgyoung avatar davidgyoung commented on September 8, 2024

@jessolo, understand that by repackaging the library and making the model-distance-calculations.json file not available on the classpath, you are using the library in a non-standard way. It is this repackaging that is causing the problem.

That said, I have made some changes on the following branch that may allow you to use the library in this non-standard manner. Please give it a try and let me know if it helps:

https://github.com/AltBeacon/android-beacon-library/tree/proceed-with-missing-distance-calculator

If this solves your problem, I will test in a standard configuration and then merge this onto master.

from android-beacon-library.

jessolo avatar jessolo commented on September 8, 2024

This seems to be working in my case. Looks good. The RuntimeException is the one which created the issue. Pls merge it to the master.

from android-beacon-library.

davidgyoung avatar davidgyoung commented on September 8, 2024

merged to master

from android-beacon-library.

IgorGanapolsky avatar IgorGanapolsky commented on September 8, 2024

@davidgyoung Can you repost the link to your proposed changes? That link doesn't work anymore.

from android-beacon-library.

Related Issues (20)

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.