proximity

Using proximity sensor lock and unlock a home screen

拥有回忆 提交于 2019-12-01 11:02:42
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 - curTime1)==100000) { mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);

Possible keys for AlternateIdentities in Peerfinder

两盒软妹~` 提交于 2019-12-01 07:35:12
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 different key in the: PeerFinder.AlternateIdentities[KEY] = ""; line of code. The MSDN documentation

How to know the closest iBeacon

点点圈 提交于 2019-11-30 22:56:22
I have a code to know which beacon is the closest, but I have a problem when a beacon's accuracy is -1.00000, the the app takes the second one. So there is a bucle that seek for the closest beacon looking for others and comparing the one closest with the others found around. Then when I know which is the closest one I show it's view to the user, but when other beacon is closer to the ipad the view is close and the view is shown. I'm using iOS 7.1 and 7.0.4 on 2 iPads, first is iPad3 and the second one is an iPad Mini Retina. Here you have the code: - (void)locationManager:(CLLocationManager *

How to know the closest iBeacon

旧巷老猫 提交于 2019-11-30 17:57:57
问题 I have a code to know which beacon is the closest, but I have a problem when a beacon's accuracy is -1.00000, the the app takes the second one. So there is a bucle that seek for the closest beacon looking for others and comparing the one closest with the others found around. Then when I know which is the closest one I show it's view to the user, but when other beacon is closer to the ipad the view is close and the view is shown. I'm using iOS 7.1 and 7.0.4 on 2 iPads, first is iPad3 and the

Lucene Proximity Search for phrase with more than two words

蓝咒 提交于 2019-11-30 05:53:26
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! The slop (proximity) works like an edit distance (see PhraseQuery.setSlop ). So, the terms could be reordered or have extra terms added. This means that the proximity would be the maximum

BTLE (Bluetooth Low energy) development kit - must have proximity profile

痴心易碎 提交于 2019-11-30 05:19:09
Can anyone point me towards a tried and tested development kit (board) for Bluetooth Low Energy? I am especially interested in the proximity profile, and compatibility with smartphone (especially iPhones and Android devices - but also any other that would have BTLE). Also, can you tell me which smartphones would support the proximity profile? I note that tod list devices that have BT4.0 functionality. Of course that does not guarantee that APIs will be exposed in the SDK. If you stick with an already implemented profile then you may be ok but as I said, you certainly will not find that in the

Android GPS proximity alert not working

本小妞迷上赌 提交于 2019-11-29 15:27:19
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; import android.content.IntentFilter; public class MainActivity extends Activity { private static final

BTLE (Bluetooth Low energy) development kit - must have proximity profile

99封情书 提交于 2019-11-29 03:45:59
问题 Can anyone point me towards a tried and tested development kit (board) for Bluetooth Low Energy? I am especially interested in the proximity profile, and compatibility with smartphone (especially iPhones and Android devices - but also any other that would have BTLE). Also, can you tell me which smartphones would support the proximity profile? 回答1: I note that tod list devices that have BT4.0 functionality. Of course that does not guarantee that APIs will be exposed in the SDK. If you stick

Can a broadcastReceiver catch multiple broadcasts?

两盒软妹~` 提交于 2019-11-28 21:59:30
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, String poiName, String intentfilter) { Bundle extras = new Bundle(); extras.putString("name", poiName);

Android proximity sensor issue only in Samsung devices

核能气质少年 提交于 2019-11-28 11:13:44
Specific scenario to avoid problems: Behaviour for Activity in Samsung devices was different in the manner that every time there was a change detected, for proximity, it resulted in a call to onPause()/onResume() ONLY on SAMSUNG devices. I was clearing the proximity sensors in onPause() which resulted in a behaviour unique to Samsung devices. Hope this saves some time for anybody who's facing this. I removed the call of clearing proximity listeners from onPause() and now it works as expected on the mentioned devices. UPDATE: What is mentioned below is not the only issue, the proximity sensor