proximity

Using proximity sensor lock and unlock a home screen

无人久伴 提交于 2019-12-30 11:08:22
问题 I am doing one application using proximity sensor in android. when sensor changed it should lock the phone and when phone is locked using same sensor it should unlock a phone. To lock a phone am using double tap mechanisam. for lock using only a single tap. my code is like below: @Override public void onSensorChanged(SensorEvent event) { // TODO Auto-generated method stub if(event.sensor.getType()==Sensor.TYPE_PROXIMITY){ if(curTime2 - curTime1 < 1000) { Tap++; if(Tap==2 ) //&& (curTime2 -

Can a broadcastReceiver catch multiple broadcasts?

半腔热情 提交于 2019-12-29 04:23:08
问题 I am trying to create multiple proximity alerts but I cant get it to work... I think that the broadcast receiver gets overwritten and thus is handling only the last broadcast. So if I had two points close by only the one whose intent was created last will generate an alert... I read that I should use request codes but I have no idea on how to do that... My method for setting up the pending intents and the broadcast receiver... private void addProximityAlert(double latitude, double longitude,

Maximum number of peripherals on CoreBluetooth?

你说的曾经没有我的故事 提交于 2019-12-28 04:14:36
问题 I am interested in working with BLE proximity sensor on iOS and have been looking up for a few answers to my query but could not find any solid ones. 1) Is there a maximum number of BLE slaves the CoreBluetooth can handle? 2) Will the slaves (about 10 devices) be able to be operated all at once i.e. if any slaves were to disconnect, master will be alerted while not affecting others? 回答1: Theoretically, there is no limit to the number of Bluetooth LE devices that can be connected to a single

Problems with BroadcastReceiver and multiple proximity alerts

家住魔仙堡 提交于 2019-12-25 06:52:47
问题 I realize this question already exists, but I am having trouble implementing the solutions. I'm using these questions as guidlines: multiple proximity alert based on a service set 2 proximity alerts with the same broadcast Where I register the receiver: final String NEAR_YOU_INTENT = "neighborhood.crodgers.example.activities.PROXIMITY_ALERT"; IntentFilter filter = new IntentFilter(NEAR_YOU_INTENT); registerReceiver(new LocationReceiver(), filter); Where the proximity alerts are added (Note:

Does windows phone currently have APIs for proximity and light sensors?

人走茶凉 提交于 2019-12-23 19:15:57
问题 Does windows phone currently have APIs for proximity and light sensors? I want to access these two sensors, but can not find the API. Is there some methods to use them ? 回答1: Unfortunately, no. Sensor APIs available are listed here: http://msdn.microsoft.com/en-us/library/microsoft.devices.sensors%28v=VS.92%29.aspx If you really need it, then you should find it & vote for it here: http://wpdev.uservoice.com/forums/110705-app-platform ; They are listening to the feedback, if the recent news

Solr proximity ordered vs unordered

不羁岁月 提交于 2019-12-21 05:27:04
问题 In Solr you can perform an ordered proximity search using syntax "word1 word2"~10 By ordered, I mean word1 will always come before word2 in the document. I would like to know if there is an easy way to perform an unordered proximity search, ie. word1 and word2 occur within 10 words of each other and it doesn't matter which comes first. One way to do this would be: "word1 word2"~10 OR "word2 word1"~10 The above will work but I'm looking for something simpler, if possible. 回答1: Slop means how

How to test proximity of lines (Hough transform) in OpenCV

爷,独闯天下 提交于 2019-12-20 10:46:45
问题 (This is a follow-up from this previous question). I was able to successfully use OpenCV / Hough transforms to detect lines in pictures (scanned text); at first it would detect many many lines (at least one line per line of text), but by adjusting the 'threshold' parameter via trial-and-error, it now only detects "real" lines. (The 'threshold' parameter is dependant on image size, which is a bit of a problem if one has to deal with images of different resolutions, but that's another story).

Possible keys for AlternateIdentities in Peerfinder

寵の児 提交于 2019-12-19 09:01:04
问题 I'm trying to get a hold on specific devices by using the PeerFinder class in Windows 8 / Windows Phone 8. Following the example as shown in the Build presentation: http://channel9.msdn.com/Events/Build/2012/3-047 I got the paired bluetooth devices by using these lines: PeerFinder.AlternateIdentities["Bluetooth:PAIRED"] = ""; var devices = await PeerFinder.FindAllPeersAsync(); But now I would like to get a list of devices that are connected via bluetooth or maybe even other devices by using a

Lucene Proximity Search for phrase with more than two words

痞子三分冷 提交于 2019-12-18 12:01:23
问题 Lucene's manual has explained the meaning of proximity search for a phrase with two words clearly, such as the "jakarta apache"~10 example in http://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Proximity Searches However, I am wondering what does a search like "jakarta apache lucene"~10 exactly do? Does it allow neighboring words to be at most 10 words apart, or all pairs of words to be that? Thanks! 回答1: The slop (proximity) works like an edit distance (see PhraseQuery.setSlop). So,

Android GPS proximity alert not working

冷暖自知 提交于 2019-12-18 09:04:23
问题 I'm trying to set up the most basic proximity alert, but nothing seems to happen. I'm fairly new to Android programming, so please let me know what I'm doing wrong or what am I missing. I got inspired from some source codes out here and this one. Here's my code: package com.example.proximityalert; import android.location.LocationManager; import android.os.Bundle; import android.app.Activity; import android.app.PendingIntent; import android.content.Context; import android.content.Intent;