> Attention!

New threads need to be created only inroot partition! In the future, they will be processed by moderators.

If you posted a new version of the program, please notify the moderator by clicking the "Complaint" button on your message.

Catalog of Android programs



Proximity Sensor | Lock \ unlock screen



Rep: (1063)
Proximity Sensor
Version: 1.4
Last update of the program in the header:01.04.2010
Attached Image
Description: The program uses a light sensor to lock \ unlock the screen during a call.
Feature: It works exclusively on the HTC Hero
Additionally: The program requires a certain amount of light (as I understand, will not work in total darkness)

Androlib: http://www.androlib.com/android.applicatio...ensor-xnxi.aspx

Download:
Version 1.4 http: //savagemessiahzine.com/forum/dl/post/461969/TomReay.proxSensor.apk
Older versions


Post has been editedfreemsk1 - 01.04.10, 07:40
Reason for editing: added new version



Rep: (12)
freemsk1 @ 8.12.09, 19:26*
The program requires a certain amount of light

probably a lot of light have to ...
When testing continuously the screen was locked. Rare and not for a long time been able to razblochit.



Rep: (31)
Vampir386 @ 8.12.09, 19:52*
probably a lot of light have to ...
When testing continuously the screen was locked. Rare and not for a long time been able to razblochit.

The light is normal plowing, and to unlock in a dark place, just press the arrow "back."
True, after entogo screen is not back lochitsya sort.
Conclusion: I liked the program, you can use: YES2:



Rep: (3)
I'm very dark places she did not use, so I also still like ...
but I have a body after a reboot, for example, it automatically does not start again ... has to handle include ...



Rep: (1063)
Fitchew @ 8.12.09, 22:08*
body after a reboot, for example, it automatically does not start again ...

... and this is in fact true for many programs: unsure:

Post has been editedfreemsk1 - 09.12.09, 00:52



Rep: (1063)
Noticed a nice feature even if it is unloaded from memory is loaded automatically when you call and, accordingly, does its thing: thank_you:

Post has been editedfreemsk1 - 09.12.09, 10:01



Rep: (44)
On my hero constantly flies !?



Rep: (15)
The idea is good, but I would like a slider in it that specifies the threshold ...



Rep: (42)
Raskazhite how it works what is its meaning then? Bloch is the screen but does not extinguish chtol? or Cho?



Rep: (1063)
Hario @ 15.12.09, 14:29*
Raskazhite how it works what is its meaning then?

Incoming call - device against the ear, thereby closing the light sensor - the screen goes relates ear - illuminates
The principle of operation is shownhere



Rep: (42)
freemsk1 @ 15.12.09, 19:38*
Incoming call - device against the ear, thereby closing the light sensor - the screen goes relates ear - zagoraetsyaPrintsip work shown here

pasib schA cast a spell



Rep: (9)
ceto it somehow does not work.
even when you press it the most "Test", zkryvaesh finger sensor turns off the screen for half a second, there is a sign that something about the screen is locked (on not had time to read), then unlocks itself, then it appears for half a second, and all again.
Has anyone encountered this?
but the idea is very cool ... hotstsa the program to work properly ...



Rep: (42)
snatchik @ 15.12.09, 22:25*
ceto it somehow did not rabotaet.dazhe when in itself push "Test", the finger sensor zkryvaesh, a half-second blank screen, there is an inscription that something about the screen is locked (more did not have time to read), then unlocks itself, and then sign again there for half a second and vso.kto anyone encountered this? and the idea is cool ... very hotstsa the program to work properly ...

Washing it plows) but poor sensitivity to light, have me he only razblochivaetsya when lamp is directed at the consecration of the home, and he Bloch screen your window with a green circle), the program needs to be developed!) or on Hiro Kosyakova sensor (



Rep: (9)
Hario,
Cheto I do not quite understand) and you, as I have described?
when calling way too lochit screen as I have described. = /
why is that?
upd: I still noticed that if you disable this program (or in its absence), during the conversation the screen turns off after 10 seconds after closing the sensor finger ....

Post has been editedsnatchik - 16.12.09, 03:09



Rep: (1063)
Here found the programs of posthere

<? xml version = "1.0" encoding = "utf-8"?>
<manifest xmlns: android = "http://schemas.android.com/apk/res/android "
package = "TomReay.proxSensor"
android: versionCode = "1"
android: versionName = "1.0">
<application android: icon = "@ drawable / icon" android: label = "@ string / app_name">

<activity android: name = "proxSensor."
android: label = "@ string / app_name" android: launchMode = "singleInstance" android: icon = "@ drawable / icon">
<intent-filter>
<action android: name = "android.intent.action.MAIN" />
<category android: name = "android.intent.category.LAUNCHER" />
</ intent-filter>
</ activity>

<activity android: name = ". lockScreen" android: launchMode = "singleInstance" />

<activity android: name = "closer." android: launchMode = "singleInstance" />

<receiver android: name = "callStart." android: label = "@ string / app_name" android: permission = "android.permission.PROCESS_OUTGOING_CALLS">
<intent-filter>
<action android: name = "android.intent.action.PHONE_STATE"></ action>
</ intent-filter>
</ receiver>

<service android: name = ". callInProgress">
<intent-filter>
<action android: name = "TomReay.proxSensor.START_SERVICE" />
</ intent-filter>
</ service>

</ application>
<uses-sdk android: minSdkVersion = "3" />
<uses-permission android: name = "android.permission.READ_PHONE_STATE"></ Uses-permission>
<uses-permission android: name = "android.permission.WAKE_LOCK" />
</ manifest>



package TomReay.proxSensor;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Application;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;



public class proxSensor extends Activity {

android: icon = "@ drawable / icon";
private SharedPreferences settings;
private CheckBox chkEnabled;

@Override
protected void onPause () {
super.onPause ();
}

@Override
public boolean onKeyDown (int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
Editor edit = settings.edit ();
edit.putBoolean ( "enabled", chkEnabled.isChecked ());
edit.commit ();
finish ();
}
return true;
}

@Override
public void onCreate (Bundle savedInstanceState) {

super.onCreate (savedInstanceState);
setContentView (R.layout.start);
settings = getSharedPreferences ( "proxSettings", 0);
Button btnTest = (Button) findViewById (R.id.btnTest);
chkEnabled = (CheckBox) findViewById (R.id.chkboxEnabled);

btnTest.setOnClickListener (new OnClickListener () {
@Override
public void onClick (View v) {
// Save preferences
Editor edit = settings.edit ();
edit.putBoolean ( "enabled", chkEnabled.isChecked ());
edit.commit ();

// Launch dialog
AlertDialog.Builder builder = new AlertDialog.Builder (proxSensor.this);
builder.setMessage ( "WARNING: Make sure you exit test mode by covering the light sensor (left most LED above the screen) and press back Not doing so will affect the battery life of your device.")
.setCancelable (false)
.setNegativeButton ( "Ok", new DialogInterface.OnClickListener () {
public void onClick (DialogInterface dialog, int id) {
dialog.cancel ();
mStartService ();
}
});
AlertDialog alert = builder.create ();
alert.show ();
}
});
}

@Override
protected void onResume () {
super.onResume ();

chkEnabled.setChecked (settings.getBoolean ( "enabled", true));
}

public void mStartService () {
Intent i = new Intent (this, callInProgress.class);
i.putExtra ( "KILL", false);
i.putExtra ( "TEST", true);
startService (i);
finish ();
}
}


PS: at the convenience store has been updated to 1.1, added to the cap

Post has been editedfreemsk1 - 16.12.09, 10:00



Rep: (0)
It seemed to me or she cancels the native lock screen and that does not work anymore?



Rep: (0)
And that standard is not enough?

I do not stalknulsya with uhonazhatiem lucky? I use only a week or pleased at all 100%

Post has been editedR-a-n - 15.01.10, 01:19



Rep: (0)
I downloaded and installed, but the program does not work as described above. The settings enabled. What's wrong?



Rep: (1063)
added a new version of the kind of work has become more stable



Rep: (0)
Right now earned prog ok! I recommend!



Rep: (15)
The program has been updated to version 1.3
According to the description improved download speed, corrected minor bugs.
Attached fileTomReay.proxSensor.apk(18.65 KB)


Full version    

Help     rules

Time is now: 21/10/20, 15:42