Browse files

Odd conflicts in AndroidManifest.xml

updates for api level 10
  • Loading branch information...
2 parents 7495d28 + 01d3884 commit 1f2adbae38f03a7110194952d070381ec4662b75 @detarmstrong committed Jun 24, 2011
View
BIN .AndroidManifest.xml.swp
Binary file not shown.
View
12 .settings/org.eclipse.jdt.core.prefs
@@ -1,12 +0,0 @@
-#Wed Feb 16 23:11:45 PST 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
View
3 .settings/org.eclipse.ltk.core.refactoring.prefs
@@ -1,3 +0,0 @@
-#Sat Feb 19 18:27:30 PST 2011
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
View
54 AndroidManifest.xml
@@ -1,33 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-<manifest package="com.futilities.mindtimer"
- android:versionCode="2" android:versionName="1.1"
- android:installLocation="internalOnly" xmlns:android="http://schemas.android.com/apk/res/android">
- <uses-permission android:name="android.permission.NFC" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-feature android:name="android.hardware.nfc"
- android:required="false" />
- <uses-feature android:name="android.hardware.camera"
- android:required="true" />
- <supports-screens android:anyDensity="true"></supports-screens>
- <uses-sdk android:targetSdkVersion="9"
- android:minSdkVersion="7"></uses-sdk>
+<!-- * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this
+ file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0
+ * * Unless required by applicable law or agreed to in writing, software * distributed under
+ the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. * See the License for the specific language governing permissions
+ and * limitations under the License. -->
+<manifest package="com.futilities.mindtimer" android:versionCode="2"
+ android:versionName="1.1" android:installLocation="internalOnly"
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-permission android:name="android.permission.NFC" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-feature android:name="android.hardware.nfc" android:required="false" />
+ <uses-feature android:name="android.hardware.camera" android:required="true" />
+ <supports-screens android:anyDensity="true"></supports-screens>
+ <uses-sdk android:targetSdkVersion="9" android:minSdkVersion="7"></uses-sdk>
<!-- Must install internalOnly because AlarmManagers are killed when files system mounted
on usb http://developer.android.com/guide/appendix/install-location.html#ShouldNot -->
- <uses-permission android:name="android.permission.VIBRATE"></uses-permission>
+ <uses-permission android:name="android.permission.VIBRATE"></uses-permission>
<application android:label="@string/app_name"
android:debuggable="true" android:icon="@drawable/ic_launcher">
@@ -39,14 +29,14 @@
<category android:name="android.intent.category.LAUNCHER" />
<!-- <action android:name="android.nfc.action.TAG_DISCOVERED"></action> -->
<!-- <category android:name="android.intent.category.DEFAULT"></category> -->
- </intent-filter>
- </activity>
+ </intent-filter>
+ </activity>
<activity android:name="TimerEdit" android:windowSoftInputMode="stateUnchanged"></activity>
- <activity android:name="IntervalPicker" android:label="Set Duration"
- android:screenOrientation="portrait">
- <intent-filter>
+ <activity android:name="IntervalPicker" android:label="Set Duration"
+ android:screenOrientation="portrait">
+ <intent-filter>
<!-- <action android:name="android.intent.action.MAIN"></action> -->
<!-- <category android:name="android.intent.category.LAUNCHER"></category> -->
</intent-filter>
@@ -62,4 +52,4 @@
</activity>
<receiver android:name="NotificationReceiver"></receiver>
</application>
-</manifest>
+</manifest>
View
33 res/xml/filter_nfc.xml
@@ -0,0 +1,33 @@
+<!--
+ filter_nfc.xml
+
+ Copyright (C) 2011 Eric Butler
+
+ Authors:
+ Eric Butler <eric@codebutler.com>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <tech-list>
+ <tech>android.nfc.tech.IsoDep</tech>
+ </tech-list>
+ <tech-list>
+ <tech>android.nfc.tech.MifareClassic</tech>
+ </tech-list>
+ <tech-list>
+ <tech>android.nfc.tech.MifareUltralight</tech>
+ </tech-list>
+</resources>
View
7 src/com/futilities/mindtimer/TagTimerActivity.java
@@ -62,7 +62,7 @@ protected void onCreate(Bundle savedInstanceState) {
Intent intent = getIntent();
String action = intent.getAction();
- if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)) {
+ if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action) || NfcAdapter.ACTION_TECH_DISCOVERED.equals(action)) {
Parcelable[] rawMsgs = intent
.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);
NdefMessage[] msgs;
@@ -322,7 +322,10 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
public void onDestroy(){
super.onDestroy();
- mDbAdapter.close();
+ if(mDbAdapter != null){
+ mDbAdapter.close();
+
+ }
}
}

0 comments on commit 1f2adba

Please sign in to comment.