Giter Site home page Giter Site logo

Comments (5)

lpellegr avatar lpellegr commented on June 9, 2024

@Proxcentaur Thanks for opening this issue.

The current library is not compatible with Android.

I will publish a working version in the next hours along with a full working example for Android.

from ipregistry-java.

lpellegr avatar lpellegr commented on June 9, 2024

A new version has been released (3.1.1). The library is now compatible with Android.

Here is a fully working Android example that makes use of the new version:
https://github.com/ipregistry/ipregistry-android

Do not hesitate if you have any questions or still encountering any issues.

from ipregistry-java.

Proxcentaur avatar Proxcentaur commented on June 9, 2024

Thank you

from ipregistry-java.

lpellegr avatar lpellegr commented on June 9, 2024

I suggest looking at the provided example:

https://github.com/ipregistry/ipregistry-android/blob/master/app/src/main/java/com/example/ipregistry_android/IpregistryTask.java#L31

The line ipregistry.lookup(); performs a remote call to the Ipregistry API. This kind of request is what we call in our docs an Origin IP lookup. It returns the data behind the IP address the API request is coming from. If I understand correctly, this is what you want.

There is no provided method to get the client IP from a request header since this is specific to the infrastructure/network and server you are using. It's up to you to read/parse the header value you need, then you can pass the IP address to the lookup method as such ipregistry.lookup("1.2.3.4"). In that case, you will get IP Info for the provided IP address, namely 1.2.3.4 in this example.

from ipregistry-java.

Proxcentaur avatar Proxcentaur commented on June 9, 2024

Thanks, I have read it carefully through the documentation too

from ipregistry-java.

Related Issues (1)

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.