proximity

Using proximity sensor in android

邮差的信 提交于 2019-12-17 15:31:59
问题 I want to use proximity sensor in my project. I searched for proximity sensor tutorial. And I found a sensor tutorial at http://www.vogella.com/articles/AndroidSensor/article.html#sensoroverview_manager. I tried to use proximity sensor as following code: @Override public void onSensorChanged(SensorEvent event) { if(event.sensor.getType() == Sensor.TYPE_PROXIMITY) { Toast.makeText(getApplicationContext(), "working", Toast.LENGTH_SHORT).show(); } } My Activity is implementing

iPhone Proximity Sensor

无人久伴 提交于 2019-12-17 08:30:30
问题 Can the iPhone SDK take advantage of the iPhone's proximity sensors? If so, why hasn't anyone taken advantage of them? I could picture a few decent uses. For example, in a racing game, you could put your finger on the proximity sensor to go instead of taking up screen real-estate with your thumb. Of course though, if this was your only option, then iPod touch users wouldn't be able to use the application. Does the proximity sensor tell how close you are, or just that something is in front of

Java Errors in Android App

*爱你&永不变心* 提交于 2019-12-14 03:36:28
问题 I'm trying to to implement a addProximityAlert when an info window is clicked googleMap.setOnInfoWindowClickListener( new OnInfoWindowClickListener(){ public void onInfoWindowClick(Marker marker) { public void addProximityAlert(double latitude, double longitude){ LatLng clickedMarkerLatLng = marker.getPosition(); double lat = clickedMarkerLatLng.latitude; double long1 = clickedMarkerLatLng.longitude; Log.e("hello", "Output=" + lat + long1); LocationManager lm; // double lat=123,long1=34; /

Lucene SpanNearQuery partial matching

两盒软妹~` 提交于 2019-12-13 00:07:04
问题 Given a document {'foo', 'bar', 'baz'}, I want to match using SpanNearQuery with the tokens {'baz', 'extra'} But this fails. How do I go around this? Sample test (using lucene 2.9.1) with the following results: givenSingleMatch - PASS givenTwoMatches - PASS givenThreeMatches - PASS givenSingleMatch_andExtraTerm - FAIL ... import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene

Android GPS Proximity Alert when starting within the set proximity

故事扮演 提交于 2019-12-12 10:19:54
问题 I would like to use Android's Proximity Alert for my garage door app. I have a button setup, that when pressed add's the proximity alert and starts tracking location. I want it to track indefinitely until I either enter or exit the proximity. If entering it will open the garage door, if exiting it will close the garage door after which I remove the proximity alert and GPS shuts off. I have it working close to perfectly. The problem is, when I press the button while in my driveway, hence in

Proximity alert for locations saved at server

℡╲_俬逩灬. 提交于 2019-12-12 08:25:28
问题 I did some search but could not find a suitable answer. My App should compare with multiple locations for proximity. This means I will not be able to save all the locations into my app to confirm the proximity using locationManager. I want the proximity confirmation to be done in the server What would be the best way to implement this? Would it be sensible if the app asks for proximity confirmation every time the devices moves around? 回答1: I would try a different approach, since location

Solr highlighting gives field/snippets with ANY term, instead of those that satisfy the query fully

爷,独闯天下 提交于 2019-12-12 02:13:53
问题 I'm using Solr 5.x, standard highlighter, and i'm getting snippets which matches even one of the search terms only, even if i indicate q.op=AND. I need ONLY the fields and snippets that matches ALL the terms (unless i say q.op=OR or just omit it), i.e. the field/snippet must satisfy the query. Solr does return the field/snippet that has all the terms, but also return many others. I'm using hl.fl=*, to get the only fields having the terms, and searching against the default field ('text'

php : word proximity script?

微笑、不失礼 提交于 2019-12-11 18:07:37
问题 Okay - so, I've spent ages searching in Google, and even went through a few specific searches at hotscripts etc., several php forums and this place ... nothing (not of use anyway). i want to be able to take a block of text (page/file/doc) and pull it apart to find the "distance" between specific terms (find the proximity/raltional distance etc.). I woudl have thought there'd be at least a few such thigns around - but I'm not finding them. So - it may be harder than I thought. I understand it

Can i detect if a user canceled navigation from Google Maps App

纵饮孤独 提交于 2019-12-11 01:49:14
问题 My app calls an Intent to open the Google Maps App like so Intent navigation = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q="+trueFriend.lat+","+trueFriend.lon)); startActivity(navigation); When i do that i would like to set a ProximityListener to detect if the user has arrived to there location, then let the other user know that they have arrived. That much i can do, however in order to prevent a few issues i need to detect if a user has canceled there navigation, or stopped

Is NFC necessary to use Peerfinder?

我是研究僧i 提交于 2019-12-10 21:21:16
问题 In a Windows Store application, I am attempting to use the PeerFinder class to locate the Bluetooth enabled devices around me, but I get an generic exception every time I call Peerfinder.FindAllPeersAsync(): One or more errors occurred while processing the request. (Exception from HRESULT: 0x80070306) I think the issue is what Peerfinder.SupportedDiscoveryTypes == PeerDiscoveryTypes.None, but I'm not sure why this is. My computer does not have an NFC radio, but it does have Bluetooth. I would