Detecting other devices location relative to your own via Wifi Direct [closed] - android

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am working on a personal project where by I would like to create something like a radar displaying the devices around me that are wifi direct enabled. The devices detected should be displayed on the radar view relative to my devices position (which would act as the center of the view).
I cannot find anything in the API's that allows me to do this and could use an example, failing that at least a push in the right direction to get started.

I think you could do it using the technique outline here in the Android docs. (I'm now experimenting with it, but for different purposes). Basically, this lets devices broadcast and discover DNS-SD TXT records. As you'll see in the Android docs, you can load a Map object into one of these records and the receiving device can read it. It doesn't support a lot of bytes (I was trying to jam in an image converted to Base64 strings and that was way too much data), but it would support strings for latitude and longitude. Users would need to install your app on both sides for it to work, of course. Interactions can be passive until such time as you need to trade larger amounts of data, at which time a socket needs to be setup, etc., which requires the user to click to accept via a popup dialog.
If you copy/paste their sample code, it will pretty much get you going with something you can build on.

Related

How to get Internet Speed? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Currently, I am struggling to show the internet speed consistently in the status bar. What I am able to do is, finding the internet speed by the old approach(Upload & download some file from/to server and using TrafficStats API). I tried some of the play store apps, they all displaying the internet speed when the user opens up any app which uses the internet. I want to implement the same feature. I believe they either use a broadcast receiver or service. How can I implement the same?
Or is there any library which does the same or any other better approach?
The problem with displaying an internet speed is that it is always going to be 'historical' or an estimate - i.e. even if you were able to achieve 300Mbps 1 second ago it does not mean you will be able to achieve it now.
Bearing this in mind, the approach you already outlined is as reliable as any - i.e. measure the round trip time for a known size of data. If accuracy is important to you, this is probably the most accurate provided you are confident of the turnaround time on the server side.
You can listen to Android Network events which will tell you when the type of network connections has changed etc - the recommended approach has changed over API levels but this is a good starting point: https://developer.android.com/training/monitoring-device-state/connectivity-monitoring
For your example it sounds like you want to get as recent as possible Network Stats rather than connectivity changes - for that the 'NetworkStatsManager' is probably the best match.
Provides access to network usage history and statistics. Usage data is collected in discrete bins of time called 'Buckets'.
https://developer.android.com/reference/android/app/usage/NetworkStatsManager

Tap to exchange data between device A and device B [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
We want to develop application which used to share important data in secure way. Idea is:
Data to be exchanged between phone A and phone B (and vice versa) when users “Tap” the phones together. The date, time and location of this action is to be recorded.
This should work anywhere (in buildings or in rural areas where there is no mobile signal coverage), and work cross platform (iOS, Android, Windows).
we want to know is it possible to develop such application ?
Thanks,
Yes, you can 'bump' phones and send over Bluetooth. You would use the accelerometer of the phones to detect the 'bump' part. The date, time and location you can pull straight from the devices (given you have GPS permission).
It would be a lot of work to develop right, especially across multiple platforms, and I believe an app like that already exists, for sharing contact information.
Also for future reference, you're probably getting down-votes because you're not asking specifically about code. Best of luck.

How to game calculate the time for completion of work? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
i be wondering How to game calculate the time for completion of work?
e.x:clash of clans find something update are done.
i believe someone want say get the time by server.but even i be offline can receive notification which say done.even i do change clock of phone nothing change in game if i change time of phone.
The time that is used to determine the yield from objects existing in clash of clans is maintained from a centralized server.
If you wanted to build an app that would calculate the times required to do things in game I think the rout to go would be to
A) ask the developers for the code (unlikely to be fruitful)
B) reverse compile the code. (potentially illegal)
C) Hand document the times required for in game events to happen (game w/notes)
D) Do a literature review to find data on the game
From this Data you may be able to craft a sort of clash of clans advisory app, but I doubt it will be easy to dupe such a consistently maintained app with hacks as simple as changing you're clock.

Android App on Multiple Devices [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have been developing a concept for an Android application for doctors to use, and it involves the use of an Android mobile phone and a tablet in the operation theater. I will have a clickwheel sort of menu on the app running on the phone, and another instance of the app running on the tablet. When a user selects an option using the wheel, this event has to trigger the rendering of a view on the tablet. I'm quite new to Android development, so any help on how this could be implemented would be great!
Thanks in advance!
Krishna
You'll have to get the devices on the same network (of some sort). And device some sort of communications whereby the phone can send the selected choice over the network to the tablet, and the tablet can then react by updating its UI.
This communication could be achieved in many different ways: Bluetooth, or Wifi I think are the easiest two to implement. Which one fits your use case better would be something we wouldn't know without more information though.
In order for this to be accomplished you have to have some sort of messaging system between the devices. You'd likely make some server API call on menu selection on the phone. From there you can have the web service kick off a GCM message to the tablet OR have the tablet polling the server every x seconds checking for the change and responding appropriately.
As FoamyGuy stated, bluetooth might also be a viable option.

Get directions from an Android device to another [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am using Google Maps and getting latitude/longitude. I have a conundrum:
Let's say I have an Android device in one room (at home) facing upright (device A) and another Android device in a flat position (device B). I would like to find out which direction device 'A' is facing and directions to that device from device 'B'. Also, if it is possible, how do I find the path to that device?
Is there a solution I can apply for the above requirement? Even via Bluetooth, if possible.
In short, how can device 'A' get to device 'B' in a room?
You should just start with simple algorithm for drawing a line between coordinates of A and B. Once that's done, you can consider orientation and see what difference it make, perhaps you don't even need to care about orientation at all, as usually a device is of a relatively small size. Drawing a line between two coordinates on the same plane is really quite simple. If you need to take care what roads you take, then you can just start by playing with URL parameters of Google Maps in the browser.

Categories

Resources