Android Wear Authorization not Working - android

I created an app for the Wear operating system.
I used Android Studio 3.1.3
In this app I inserted a button and on the click of this I would like the watch to vibrate.
The problem is that the permissions of the app do not work.
I entered the request for vibration permission in the manifest, but when I start the app on the clock does not require me permissions and if I check the permissions registered for the app tells me that no authorization is required.
where am I wrong?
this is my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ginetto.martinelli.warehousenotification">
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.WAKE_LOCK" android:requiredFeature="true" />
<uses-permission android:name="android.permission.VIBRATE" android:requiredFeature="true"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#android:style/Theme.DeviceDefault">
<uses-library
android:name="com.google.android.wearable"
android:required="true" />
<meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" />
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="#string/default_notification_channel_id"/>
</application>
</manifest>

Related

Android TV App not displaying in Google Play Store

Below is my manifest file, I have included all the necessary code as per the document but still the app is not displaying in the play store search. I searched using the appId for my Alpha build using my test account which i have included in the tester list.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.package">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<application
android:name=".TestApp"
android:allowBackup="true"
android:banner="#drawable/logo"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<receiver android:name=".BootReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:directBootAware="true">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="android.intent.action.REBOOT"/>
</intent-filter>
</receiver>
<activity
android:name=".activity.MediaActivity"
android:theme="#style/Theme.AppCompat"
android:launchMode="singleInstance"/>
<activity
android:name=".activity.CodeActivity"
android:theme="#style/Theme.Leanback">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.CodeAndroidStickActivity"
android:theme="#style/Theme.AppCompat">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I tried setting the android.software.leanback field to both true and false, but still not getting displayed
In your app manifest, you must declare that a touch screen is not required, as shown this example code; otherwise, your app won't appear in Google Play on TV devices.
<manifest>
<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />
...
</manifest>

How does the premium version of Here sdk api work?

I signed up with Here sdk Api (Lite version) and I got a 'Freemium' account with an access_key_id and a secret_key as well. Now I want to upgrade my Freemium to Premium because I need the navigation tool for my application and they gave me an app code, api code and licence key (in the same account). when I built the application all I got is a blank page with a button and no errors in my terminal.
My Manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.here_map_nav">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:hardwareAccelerated="true"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.here.android.maps.appid"
android:value="XXX" />
<meta-data
android:name="com.here.android.maps.apptoken"
android:value="XXX" />
<meta-data
android:name="com.here.android.maps.license.key"
android:value="XXX" />
<service
android:name="com.here.android.mpa.service.MapService"
android:label="{YOUR_LABEL_NAME}"
android:exported="false">
<intent-filter>
<action android:name="{YOUR_INTENT_NAME}"/>
</intent-filter>
</service>
</application>
By the way I don't know what to put in {YOUR_INTENT_NAME} and {YOUR_LABEL_NAME} . I don't know if it's the main problem or I should create an account for a premium version with my billing infos (since each account takes only one project)
Any help or clarifications would be appreciated!
try using below manifest.xml, it seems like action.VIEW is missing in yours.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<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">
<meta-data android:name="com.here.sdk.access_key_id" android:value="xx" />
<meta-data android:name="com.here.sdk.access_key_secret" android:value="xx" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

Firebase registration token is empty?

I'm trying to add push notification support for my Android app. I think Ravi Tramada's code makes a nice starting point, so I take it.
Basically I just copied his code. I've added both MyFirebaseInstanceID.java and MyFirebaseMessagingService.java as service in AndroidManifest.xml. Nothing happens. Every time I run the app, it always says "Firebase reg ID is not recieved yet" .
I've uploaded the whole app to this repository. Could someone enlighten my what goes wrong here?
I show your code in GitHub
Write your service inside application tag like this:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<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">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Firebase Notifications -->
<service android:name=".MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name=".MyFirebaseInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<!-- ./Firebase Notifications -->
</application>
</manifest>

Can I integrate Microsoft Lens into my application?

I like Office Lens's ability to automatically crop, focus, and align a picture... mainly for receipt and expense processing
I want to have an app flow that goes like this:
User opens my app and clicks photograph receipt
Lens opens (android intent, or similar in iOS)
User takes picture
Picture is returned to my application for processing
I am having trouble making that flow happen, and to make the data transfer (photo) between the camera and my app seamless. What options do I have?
If you look at Androidmanifest.xml file, you will see this XML:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.office.officelens" platformBuildVersionCode="21" platformBuildVersionName="5.0.1-1624448">
<uses-permission android:name="android.permission.CAMERA" android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER"/>
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.READ_PROFILE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<application android:allowBackup="true" android:icon="#drawable/ic_officelens" android:label="#string/officelens_app_name" android:largeHeap="true" android:name="com.microsoft.office.officelens.OfficeLensApplication" android:theme="#style/OfficeLensAppTheme">
<activity android:label="#string/officelens_app_name" android:name="com.microsoft.office.apphost.LaunchActivity" android:theme="#style/OfficeLensSplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:configChanges="orientation|screenSize" android:label="#string/officelens_app_name" android:launchMode="singleTask" android:name="com.microsoft.office.officelens.MainActivity" android:theme="#style/FullscreenTheme"/>
<activity android:label="#string/officelens_app_name" android:name="com.microsoft.office.officelens.SecureActivity" android:parentActivityName="com.microsoft.office.officelens.MainActivity" android:windowSoftInputMode="stateHidden"/>
<activity android:label="#string/title_activity_settings" android:name="com.microsoft.office.officelens.SettingsActivity" android:parentActivityName="com.microsoft.office.officelens.MainActivity"/>
<activity android:configChanges="orientation|screenSize" android:label="" android:name="com.microsoft.office.officelens.AboutActivity" android:parentActivityName="com.microsoft.office.officelens.SettingsActivity"/>
<activity android:label="" android:name="com.microsoft.office.officelens.FirstRunActivity" android:parentActivityName="com.microsoft.office.officelens.MainActivity" android:screenOrientation="portrait" android:theme="#style/OfficeLensFirstRunTheme"/>
<activity android:label="#string/title_activity_section_picker" android:name="com.microsoft.onenote.pickerlib.OneNotePickerActivity" android:theme="#style/Theme.AppCompat.Light"/>
<activity android:exported="false" android:icon="#drawable/ms_logo" android:label="#string/webflow_header" android:name="com.microsoft.onlineid.authenticator.AccountAddPendingActivity" android:theme="#style/Theme.MSA"/>
<activity android:configChanges="orientation|screenSize" android:exported="false" android:icon="#drawable/ms_logo" android:label="#string/webflow_header" android:name="com.microsoft.onlineid.internal.ui.WebWizardActivity" android:theme="#style/Theme.MSA" android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="com.microsoft.onlineid.internal.SIGN_IN"/>
<action android:name="com.microsoft.onlineid.internal.RESOLVE_INTERRUPT"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:configChanges="orientation|screenSize" android:exported="false" android:icon="#drawable/ms_logo" android:label="#string/webflow_header" android:name="com.microsoft.onlineid.ui.AddAccountActivity" android:theme="#style/Theme.MSA" android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="com.microsoft.onlineid.internal.ADD_ACCOUNT"/>
<action android:name="com.microsoft.onlineid.internal.SIGN_UP_ACCOUNT"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:configChanges="orientation|screenSize" android:exported="false" android:name="com.microsoft.onlineid.ui.SignOutActivity" android:theme="#style/Theme.MSA.Transparent"/>
<activity android:exported="false" android:icon="#drawable/ms_logo" android:label="#string/webflow_header" android:name="com.microsoft.onlineid.internal.ui.AccountPickerActivity" android:theme="#style/Theme.MSA.Dialog">
<intent-filter>
<action android:name="com.microsoft.onlineid.internal.PICK_ACCOUNT"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<service android:exported="false" android:name="com.microsoft.onlineid.internal.MsaService">
<intent-filter>
<action android:name="com.microsoft.onlineid.internal.GET_TICKET"/>
<action android:name="com.microsoft.onlineid.internal.UPDATE_PROFILE"/>
<action android:name="com.microsoft.onlineid.internal.SIGN_OUT"/>
<action android:name="com.microsoft.onlineid.internal.SIGN_OUT_ALL_APPS"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service android:enabled="true" android:exported="false" android:name="com.microsoft.onlineid.sso.service.MsaSsoService">
<intent-filter>
<action android:name="com.microsoft.msa.action.SSO_SERVICE"/>
</intent-filter>
<meta-data android:name="com.microsoft.msa.service.sso_version" android:value="1"/>
<meta-data android:name="com.microsoft.msa.service.sdk_version" android:value="#string/sdk_version_name"/>
</service>
</application>
<uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
</manifest>
If you read this file carefully you will see that this is impossible to interact this the other API's. Neither 'broadcast' no proper 'intent-filter' to interact this the other applications.
This is impossible nowadays.
Anyway, obviously, you can save to local storage and retrieve the data from SD card using your app.

Permissions doesn't show when installing an app

I have an app on the app store and in the manifest file I have two permissions, but when I go to install the app on a phone or tablet it says the app doesn't require any special permissions. My manifest file is below. Why does it says there are no special permissions when there is?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.howlinapps.battery.level"
android:versionCode="6"
android:versionName="1.05" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name="com.howlinapps.battery.level.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.howlinapps.battery.level.About"
android:theme="#android:style/Theme.Dialog" >
</activity>
<receiver android:name="com.howlinapps.battery.level.MyBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service
android:name="MyService"
android:icon="#drawable/ic_launcher"
android:label="Battery level service" >
</service>
</application>
</manifest>
The permissions show up on the Play Store Web site. They are not showing up in the Play Store app for some reason. So long as your app is working -- meaning that you are getting the permissions -- this would appear to be a bug in the Play Store app and, therefore, is not your problem.

Categories

Resources