Skip to content

Commit

Permalink
PowerManagement fixes for cordova 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Viras- committed Jul 31, 2012
1 parent 7942447 commit 95ae5e2
Show file tree
Hide file tree
Showing 5 changed files with 5,731 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ public void setContext(CordovaInterface ctx) {
super.setContext(ctx);

// Register for necessary bluetooth events
ctx.getActivity().registerReceiver(m_bpBroadcastReceiver, new IntentFilter(
cordova.getActivity().registerReceiver(m_bpBroadcastReceiver, new IntentFilter(
BluetoothAdapter.ACTION_DISCOVERY_FINISHED));
ctx.getActivity().registerReceiver(m_bpBroadcastReceiver, new IntentFilter(
cordova.getActivity().registerReceiver(m_bpBroadcastReceiver, new IntentFilter(
BluetoothDevice.ACTION_FOUND));
ctx.getActivity().registerReceiver(m_bpBroadcastReceiver, new IntentFilter(BluetoothPlugin.ACTION_UUID));
//ctx.registerReceiver(m_bpBroadcastReceiver, new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));
cordova.getActivity().registerReceiver(m_bpBroadcastReceiver, new IntentFilter(BluetoothPlugin.ACTION_UUID));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions Android/PowerManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PowerManagement
===============
Plugin for Cordova (1.9)
Plugin for Cordova 2.0

The PowerManagement plugin offers access to the devices power-management functionality.
It should be used for applications which keep running for a long time without any user interaction.
Expand All @@ -20,7 +20,7 @@ Copy the *PowerManagement.java* file to your *src/* directory.
Edit your *AndroidManifest.xml* and add the following permission:
`<uses-permission android:name="android.permission.WAKE_LOCK" />`

In addition you have to edit your *res/xml/plugins.xml* file to let Cordova know about the plugin:
In addition you have to edit your *res/xml/config.xml* file to let Cordova know about the plugin:
`<plugin name="PowerManagement" value="org.apache.cordova.plugin.PowerManagement"/>`

### iOS
Expand Down
Loading

0 comments on commit 95ae5e2

Please sign in to comment.