Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Odd conflicts in AndroidManifest.xml

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

0 comments on commit 1f2adba

Please sign in to comment.
Something went wrong with that request. Please try again.