Edit
The original post says that I can't open my test by saying "open test". Repeated attempts have shown that it does work...sometimes. Perhaps 90% of the time saying "open test" opens my test app, but the other times it does a media search. I can see the text that google is transcribing, so the two different outcomes aren't being caused by mistakes in the speech-to-text.
Original post
On an Android TV, I am able to open apps by clicking the remote's microphone button and saying "Open <appname>" (e.g. "Open youtube" or "open dailymotion"). I want this functionality in the app I develop. After deploying my app to the TV, I cannot open my app by saying "open test", where "test" is the value of android:label in the application element of AndroidManifest.xml.
I've tried this out with a basic Android-Studio generated TV projected, so my AndroidManifest.xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="<my package>"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
<uses-feature
android:name="android.software.leanback"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="test"
android:theme="#style/Theme.Leanback">
<activity
android:name=".MainActivity"
android:icon="#drawable/app_icon_your_company"
android:label="test"
android:logo="#drawable/app_icon_your_company"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
How do I add this functionality?
I have two thoughts: that there is an Android Manifest property that I haven't found in my search, or that this functionality is only available for apps available in the play store. (If I use the mike to say "open dailymotion" when I don't have dailymotion installed, the top result is a link to the app on the play store, which makes me think this functionality is reliant on being indexed by google.)
You would want to use System voice action https://developers.google.com/voice-actions/system/
https://www.youtube.com/watch?v=OW1A4XFRuyc&list=PLOU2XLYxmsIJDPXCTt5TLDu67271PruEk
Related
I have a problem with dynamic link at Firebase not redirecting me to Play Store if the application is not installed.
The dynamic link is defined as following:
The link preview (debug) show following picture:
according to this one if I click on the link and application is not installed I would be brought to Play Store. However it just opens a browser and opens the web link. The "Play Store" link though is functioning and brings me to the Play Store.
One more detail. When I click on the dynamic link on my Android phone I see three steps:
A browser window with "google.com" URL opens shortly.
Browser window is closed and I see original screen where I clicked on the link with a ring rotating for less than a second.
A browser windows opens again but this time with web link opened
And same happens even if the application is installed.
Is there a way to debug this behavior and get some better understanding of what's the reason?
The AndroidManifest.xml is defined as following:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp">
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.camera.flash" />
<application
android:label="myapp"
android:name="${applicationName}"
android:icon="#mipmap/icon">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Deep linking -->
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="myapp.com" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
As you mentioned it is in debug , i believe here that application is not present on playstore right now and that's why it is not redirecting you to playstore in case of app is not installed on your device but yes , it should open your app if it is already installed on your device
so make sure above scenario .. if flow is working same as mentioned then no worries everything is fine but if it is not working as mentioned then you need to mention code of creating link , manifest file , activity where you are handling it etc ..
So, it turned out my approach to dynamic links building was wrong. Dynamik link creation as shown in the question is a way to establish static links that don't change and have no parameters. It's usable to bring users to a specific part of your application that never changes.
In case of using dynamic link, which is dynamic in its nature like in my case - invitation link that allows to install application if it's not yet installed, run it and bring the user to a specific part of the application with parameters would be:
Define a URL prefix
Publish the application at Play Store at least in closed testing mode. Internal testing seems not to be enough because it's available only by internal testing ID and not the package ID.
Generate URL of type: https://myapp.page.link/?link=https://myapp.com/join/invitation_id&apn=com.myapp
That is enough to make work for Android. For iOS it's not tackled yet.
I have an issue with Oauth Google on Android 9 and lower.
Settings :
I develop an application with :
Nativescript 7
Angular 11
nativescript-oauth2:3.0.3 plugin
The problem :
I am not sure the problem is from the nativescript-oauth2 plugin, perhaps my android application configuration or Google Frame.
I develop an OAuth login with Facebook and Google provider.
For Facebook, no problem.
Facebook use a web view browser, and Google use a native view browser.
For Google, see bellow :
on emulator with android 10 : all work fine
on emulator with android 8 or 9 :
it open the browser to login with Google => I choose my account => redirect to a Google Page with Waiting message => it never redirect to my app, and after a moment, it redirect to www.google.com
on real device (android 9) with multiple Google account, I have 2 behaviors :
First : it open the browser to login with Google => I choose my account => redirect to a Google Page with "Waiting" message => redirect to my App with The login operation was canceled error message
Second : it open the browser to login with Google => I wait a moment (per example 1 minute) => I choose my account => redirect to a Google Page with Waiting message => redirect to my App => it work fine
on other real Device with just one account Google (in android settings), it is ok
More details :
I debugged the application and the nativescript-oauth2 plugin.
I saw that the Google Frame with Waiting message (after choose a google account) send 2 events to Android with differents values for the "code" parameter.
Of course the first code is expired/revoked and Google return an error.
In the OAuth Google documentation, this is the Step 4 which send 2 responses with 2 codes.
My question
Why the Google Frame browser send me 2 events ?
Code :
Here is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<application
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.tns.NativeScriptActivity"
android:label="#string/title_activity_kimera"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
android:theme="#style/LaunchScreenTheme">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="#style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Custom URL Schemes -->
<data android:path="/auth"
android:scheme="com.googleusercontent.apps.xxxxxxxx-yyyyyyyyyyyyyyyyyy"/>
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxxxxxxxxxx" />
</application>
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="__APILEVEL__"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
</manifest>
I have Implemented google pay using stripe payment processor and it is in test Environment. When I used to test google pay with real card payment it shows a dialog box that
"Request Failed"
UnExpected developer error, Please try again later.
I am unclear why this error is showing. How to resolve these issue. Can Anyone help me out?
Manifest file
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="myproject"
android:roundIcon="#drawable/ic_launcher"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
</application>
More detailed information is shared in the logs. Make sure to remove any process/application specific filtering, since these logs emanate away from your application. If you filter using a keyword such as "wallet", you should be able to see more specific hints into your problem.
Let me know whether that helps.
I have published my first application (Voice To SMS) on google play 4 days ago and I still can't find my app in search by it's name or developer name. I can find my app only by package name or by real app name but without spaces - "VoiceToSMS".
Link to my app: https://play.google.com/store/apps/details?id=com.SpeechProcessing.Voice.To.SMS.Converter&hl=en
As we can see, in the bottom of the page there is no even "Similar apps" section...
In Google Play developer console everything seems OK (except that my app is not designed for tablets). 0 errors, I selected all available countries for distribution, app status is "Published". In app description I wrote some keywords.
What could be wrong? Maybe app is not indexed because its name is not specific?
I am attaching manifest.xml additionally:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.SpeechProcessing.Voice.To.SMS.Converter"
android:versionCode="2"
android:versionName="1.0.1" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppBaseTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
<activity
android:name="com.SpeechProcessing.Voice.To.SMS.Converter.MainActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustPan"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
/>
</application>
</manifest>
Well, more than 2 weeks gone after uploading my app on Google Play. My app is finally searchable by term "voice to sms". In my strong opinion, it wasn't Google-side issue that app wasn't searchable for a while by mentioned term.
I did one SEO trick - in app description I included some keywords whose are popular but not so like "voice to sms". In result, I got more downloads and growing my app's search rank. After few days, my app's rank was enough high that Google could show my app in results of "voice to sms" search term.
So, if you have similar problems - focus on SEO for your app.
I developed an application, under a namespace my friend and I used for joint ventures.
I've since migrated that app to my personal developer account, and must continue to use the same package name in the manifest file, else it will appear as a new app in the market, etc.
It seems odd to continue using that package name throughout the app (it was released in early 2010 when we first started learning, and the update I'm planning will be a complete rewrite), and I'd rather use my package prefix.
Can I leave the old package name in the AndroidManifest.xml file, but use the new package prefix throughout the app, and explicitly qualify any Activitys, Services or Receivers etc, in my manifest or will that cause some issue when I update the app?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
--> package="com.ouroldjointsite.theapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application>
<activity
--> android:name="uk.co.ataulmunim.theapp.TheAppActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
That is, the package attribute the only place the Play Store will check to see if an application is the same? I understand I'll still have to sign it with the same key as before.
On a side note, is it discouraged to do this, even if it works?
Thanks!
You can change the Activity's package name, just not the Application's package name.
And yes, an Activity's package name can be different than an application's package name. It's just that when you use the Android New Project... wizard to start a new project, it just assumes that the Application's package name will be the same as the Activity's package name.
No, you don't have to.
One note is that some services, such as Google Cloud Messaging require being put in your application package directory, as named after the android application package.
But aside from those two files, in my projects I have everything in a bundle package