0

I have a project to complete and I am searching for some suggestions on how to do this. Basically I need to scan the available HotSpots which I am doing with this code:

                    JSONArray array = new JSONArray();
                    for (int i = 0; i < mScanResults.size(); i++){
                        JSONObject myobj = new JSONObject();

                        try {
                            myobj.put("ssid", mScanResults.get(i).SSID);
                            myobj.put("security", mScanResults.get(i).capabilities);
                            /*
                            //here i would like to put the coordinates (lat, lon)

                            */
                            array.put(myobj);
                        } catch (JSONException e) {
                            e.printStackTrace();
                        }

. I searched but I could not find something concrete. I need this because the final goal is to show on the map (using Google Maps API) each hotspot with the relative area of coverage (eventually coloured): Like this: [https://i.stack.imgur.com/xp7nP.png

My idea to achieve this was to collect the coordinates, save them with SQLite and after with Polygons color the area calculated with some maths. Is this approach correct? Please let me know how to do this and thank you for your time.

Mostafa Arian Nejad
  • 1,278
  • 1
  • 19
  • 32
FrogFlex
  • 1
  • 4
  • The short answer is no it is not possible. – Stephen C Feb 25 '18 at 00:05
  • @Stephen C , I dont think this is an answer. Since it is a project, it is possible and I would like to gather ideas and ways to approach this. Answers like that are not helpful at all :) – FrogFlex Feb 25 '18 at 00:43
  • Sorry, but your reasoning makes zero sense. Why is what you are asking possible "since it is a project". "Answers like that are not helpful at all :)" - I disagree. It helps you by advising you not to look for something that is not technically possible. – Stephen C Feb 25 '18 at 01:02
  • Now it is possible to find out where a wifi hotspot is, but you need multiple devices in multiple locations with directional antennas that you can use to triangulate the (approximate) location of a hotspot. Obviously, there is no standard API for doing that. Obviously you cant do it on a standard Android device because standard devices don't have directional antennae. – Stephen C Feb 25 '18 at 01:07
  • My affermation was based on the fact that this project was published at my university. That's why I think that it is possible. I appreciate your honesty Stephen. – FrogFlex Feb 25 '18 at 01:07
  • Thank you for your answer. If you want I can pass you the PDF so you may read it too, but I guess this is too much. Again thank you for your time – FrogFlex Feb 25 '18 at 01:09
  • Hah! So you are assuming that the person who proposed the project has checked that the project is technically feasible ... because they work at a university. That assumption is unwarranted. Trust me, I work at a University, and I've seen how student project suggestions / proposals are put together. Go and talk to the person who proposed your project. Ask him whether he looked into the technical feasibility of doing this ... and if he did, what API you should use. – Stephen C Feb 25 '18 at 01:12
  • *"If you want I can pass you the PDF so you may read it too, but I guess this is too much."* - No I don't want. Your project advisor / supervisor should advise you. – Stephen C Feb 25 '18 at 01:16
  • Very well, I will take your advice and I will go talk to him. I will come back here as soon as I figured out what exactly he meant. Thank you Stephen, have a nice continuation! – FrogFlex Feb 25 '18 at 01:18
  • The other thing to note is that the Q&A I linked to is not necessarily correct. However, it is the best information we have here. If you find that it is incorrect (i.e. there *is a way* to get the Android APIs to tell you the location of any WiFi hotspot in range) then you should write a new answer to that Q&A ... to correct the out-of-date information, there-in. – Stephen C Feb 25 '18 at 01:30
  • Roger that, I really hope I will be able to find a solution so that I can help this community. – FrogFlex Feb 25 '18 at 01:33

0 Answers0