diff options
-rw-r--r-- | Android.bp | 17 | ||||
-rw-r--r-- | Android.mk | 24 | ||||
-rw-r--r-- | AndroidManifest.xml | 39 | ||||
-rw-r--r-- | OWNERS | 1 | ||||
-rw-r--r-- | src/com/example/android/locationattribution/MainActivity.java | 3 |
5 files changed, 39 insertions, 45 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..c5a4f18 --- /dev/null +++ b/Android.bp @@ -0,0 +1,17 @@ +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +android_app { + name: "SampleLocationAttribution", + resource_dirs: ["res"], + static_libs: [ + "androidx.core_core", + "androidx.appcompat_appcompat", + ], + // Build all java files in the src subdirectory + srcs: ["src/**/*.java"], + sdk_version: "current", + product_specific: true, +} diff --git a/Android.mk b/Android.mk deleted file mode 100644 index acc21e4..0000000 --- a/Android.mk +++ /dev/null @@ -1,24 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_USE_AAPT2 := true - -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res - -LOCAL_STATIC_ANDROID_LIBRARIES := \ - androidx.core_core \ - androidx.appcompat_appcompat - -# Build all java files in the src subdirectory -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_SDK_VERSION := current - -LOCAL_PRODUCT_MODULE := true - -# Name of the APK to build -LOCAL_PACKAGE_NAME := SampleLocationAttribution - -# Tell it to build an APK -include $(BUILD_PACKAGE) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 04029ca..c6acaf6 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -14,32 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. --> + <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.example.android.locationattribution"> + package="com.example.android.locationattribution"> - <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> - <!-- Requires permission "Allow all the time" and not just "Allow only while the app is in use" --> - <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> + <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> + <!-- Requires permission "Allow all the time" + and not just "Allow only while the app is in use" + --> + <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/> - <application - android:allowBackup="true" - android:icon="@mipmap/ic_launcher" - android:label="@string/app_name" - android:roundIcon="@mipmap/ic_launcher_round" - android:supportsRtl="true" - android:theme="@style/AppTheme"> - <activity android:name=".MainActivity"> + <application android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/AppTheme"> + <activity android:name=".MainActivity" + android:exported="true"> <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <intent-filter> - <action android:name="android.intent.action.APPLICATION_PREFERENCES" /> - <category android:name="android.intent.category.DEFAULT" /> + <action android:name="android.intent.action.APPLICATION_PREFERENCES"/> + <category android:name="android.intent.category.DEFAULT"/> </intent-filter> <intent-filter> - <action android:name="com.example.android.locationattribution.intent.action.NON_FRAMEWORK_LOCATION" /> - <category android:name="android.intent.category.DEFAULT" /> + <action android:name="com.example.android.locationattribution.intent.action.NON_FRAMEWORK_LOCATION"/> + <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> </application> @@ -1,4 +1,3 @@ -aadmal@google.com gomo@google.com wyattriley@google.com yuhany@google.com diff --git a/src/com/example/android/locationattribution/MainActivity.java b/src/com/example/android/locationattribution/MainActivity.java index 3f72bfc..83bcdc1 100644 --- a/src/com/example/android/locationattribution/MainActivity.java +++ b/src/com/example/android/locationattribution/MainActivity.java @@ -133,8 +133,7 @@ public class MainActivity extends AppCompatActivity { private void showRequestLocationPermissionDialog() { ActivityCompat.requestPermissions(this, - new String[]{Manifest.permission.ACCESS_FINE_LOCATION, - Manifest.permission.ACCESS_BACKGROUND_LOCATION}, + new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, NON_FRAMEWORK_LOCATION_PERMISSION); } |