I am trying to connect Google Now SEARCH_ACTION with my searchable activity using this piece of code in my AndroidManifest.xml:
<activity android:name=".SearchableActivity">
<intent-filter>
<action android:name="com.google.android.gms.actions.SEARCH_ACTION"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
I am following instructions on http://android-developers.blogspot.com/2014/10/the-fastest-route-between-voice-search.html and https://developer.android.com/guide/components/intents-common.html#SearchOnApp.
This is just not working. The search from Google Now is not launching my app. I have verified that:
This works for Eat 24 app, confirming that there's no issue with right version of OS/Google app/Locale.
I can launch app from inside my app and receive typed search queries, confirming that my SearchableActivity code doesn't have any issues.
Anyone has gotten this to work? Could you please let me know what I am missing here?
Well... looks like the app needs to be published on Play Store:
https://plus.google.com/+AndroidDevelopers/posts/afSRdDQiy1N - look for comments by Jarek Wilkiewicz. Going to try this next.
Related
I have been trying to publish an Android automotive application to Google Play Store, but it was rejected. The reason for the rejection was "App category not permitted. At this time, we are only accepting apps within categories supported by the Android for Cars App Library as well as the Media and Video categories."
The categories referenced above are Media apps (audio), Messaging apps, Navigation apps, Point of Interest (POI) apps and Video apps (https://developer.android.com/training/cars#supported-app-categories).
In our AndroidManifest.xml file, the category is defined like this :
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="androidx.car.app.category.POI" />
</intent-filter>
<meta-data android:name="distractionOptimized" android:value="true" />
</activity>
So my question is, why does it say it was rejected due to "..only accepting apps within categories supported by the Android for Cars App Library as well as the Media and Video categories", when the category for the application is one of these categories?
I tried to appeal, but it says it can take up to 7 days, and it would be great knowing why as soon as possible.
I have tried to search for an answer, but I have not found anything in particular.
The only thing I noticed, was that other people put their category inside , like this:
<service
android:name=".MyCarAppService"
android:exported="true">
<intent-filter>
<action android:name="androidx.car.app.CarAppService"/>
<category android:name="androidx.car.app.category.POI"/>
</intent-filter>
</service>
However, I have found that this is not always the case. An example in the documentation which does not use the (https://developer.android.com/reference/androidx/car/app/activity/CarAppActivity), says:
"The class representing a car app activity in the main display. This class is responsible for binding to the host and rendering the content given by its androidx.car.app.CarAppService."
And in the example provided, the code looks like this:
<activity
android:name="androidx.car.app.activity.CarAppActivity"
android:exported="true"
android:launchMode="singleTask"
android:label="#string/your_app_label">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="distractionOptimized" android:value="true"/>
</activity>
So my question remains; why does my app get rejected due to "not having a supported category", when the category is set to one of the five supported categories?
Final answer:
Check your androidx.car.app library version to determine which category to use if you're building a Point-Of-Interest app:
Lower than 1.3: Use PARKING or CHARGING categories.
1.3 and up: Use POI category
We ended up using the new IOT category as that suited our app best, it worked with version 1.2 of the CarApp library, it passed the review for open testing (1.3 wasn't available yet on Xamarin at the time of writing this update).
*** Original post: ***
Unfortunately, this seems to be a common problem a lot of people are having that are trying to publish Android Auto apps. See this Stack Overflow thread.
I'm also using the "androidx.car.app.category.POI" category since my app definitely does not fall under any of the other categories. Out of the 7 submissions I've done, only 3 have been approved so far, it seems the approvals are very sporadic. The rejection always has the same generic rejection message ("App category not permitted"). When you appeal the rejection, they just respond with the same rejection message.
New categories can be requested for Android Auto using this URL.
Edit:
This Stack Overflow thread suggested using the PARKING category instead of POI. Which is interesting because according to Google's Android for cars docs, the PARKING and CHARGING categories have been deprecated and should use POI instead now. I tried it and my build got approved.
I integrated the tagmanager in android for adwords conversion tracking. I want to test the container in preview mode. So I did all the things described on the google's developer page here.
I included the complete code needed for preview the container. But when I tried to launch the app from QR scanner or the link provided by tagmanager for preview.
It says:
sorry we cannot open this link. there is not any apps installed which can handle it.
Is anything I have to do except the above mentioned things.
Stumbled upon similar problem. Solved by correctly reading the manual. Steps I did:
Add this to your android manifest file and replace your information:
<activity
android:name="com.google.android.gms.tagmanager.PreviewActivity"
android:label="#string/app_name"
android:noHistory="true"> <!-- optional, removes the previewActivity from the activity stack. -->
<intent-filter>
<data android:scheme="YOUR WHOLE APP PACKAGE NAME" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
then go to GTM administration website -> container versions -> your current version -> actions -> preview and enter your WHOLE package name into the box. "eg. com.example.mygtm"
then proceed to open the link, copy adb command or scan QR code.
Hope this helps !
This is driving me really crazy. I am new to Android development but experienced in iOS development. I wanted to implement Parse Push notifications to an Android app and all is going fine:
The devices are registered at Parse
While sending a test Push message the Parse system tells me that the message is received
BUT: I don't receive anything on my Android test devices.
I have already created new Parse Apps and Android Studio projects but without any luck. Any help on debugging this or is this a Android studio related issue?
EDIT: I just followed the Push service quick guide so I added some lines to the Manifest and added this to my code
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_inlog);
Parse.initialize(this, "xxx", "xxx");
ParseFacebookUtils.initialize("1515015192073818");
ParseInstallation.getCurrentInstallation().saveInBackground();
Manifest:
<receiver android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<!--
IMPORTANT: Change "com.parse.starter" to match your app's package name.
-->
<category android:name="com.pootentieel.andrew.sbpootentieel" />
</intent-filter>
</receiver>
Did you changed com.parse.starter to match your package name and have you registered push callback receiver activity?
EDIT:
goto this link github.com/ParsePlatform/PushTutorial and import the android project and change the keys. Then run the android project and send a push to see if it works. If it works check both the projects side by side to see what is causing the problem. Please mark this answer as correct if it helped thanks :)
I have an idea to open the Google Glass native application using GCM service.
Could anybody help me with this. Is that possible.
As of right now, there is no Google Play Services on Glass. Thus you can't register for GCM messages on Glass.
However, I do see GCMBroadcastReceiver in GlassHome's apk manifest, so I assume, they added (or in progress of adding) some pieces of Play Services. Will see what's gonna happen when they officially release Glass :)
Just to summarize, no, it is not possible to open native Glass app using GCM. At least right now
You can achieve the same thin using the Mirror API to insert a card that can then be used to launch a GDK app. Specifying a menu item as like below will insert a card with a menu that the user can tap to launch
"menuItems":[
{
"action":"OPEN_URI",
"id":"OpenAppId",
"payload":"my.package.name.scheme://open?param1=value1¶m2=value2",
"values":[
{
"displayName":"Accept",
"iconUrl":"https://my_url_dot_com/glass_menu_icons/ic_done_50.png",
"state":"DEFAULT"
},
{
"displayName":"Accepting",
"state":"PENDING"
},
{
"displayName":"Accepted",
"state":"CONFIRMED"
}
]
},
You'll need this intent filter on your Android manifest file:
<intent-filter>
<data android:scheme="my.package.name.scheme" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
And can then access the query params passed in the payload as Intent extras.
I have an app that integrates both Facebook and LinkdedIn networks. According to the instructions, in order to integrate LinkedIn, I need to add the following code in my manifest, within my activity:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="x-oauthflow-linkedin" android:host="callback" />
</intent-filter>
An example can also be found here. As you can see in the link, we need to add also the " android:launchMode="singleInstance" " line, otherwise after logging in with LinkedIn a new instance of the activity will be started.
However, when trying to log in to Facebook from the same activity, this actual line results to the following error from the Facebook Login activity (!):
E/AndroidRuntime(7100): Caused by: com.facebook.FacebookException: Cannot call LoginActivity with a null calling package. This can occur if the launchMode of the caller is singleInstance.
So now, I'm somehow stuck, because removing android:launchMode="singleInstance" will make Facebook login working, but will cause the LinkedIn login to start another instance of my activity, but if I add it, then Facebook login is not working!
Does anyone have any idea how to address this issue?
Thank you,
Dimitris
After reading little bit on the documentation, it seems that replacing the singleInstance with singleTask did the trick. Although, I haven't figured out exactly why, I am posting this for others to see it in case someone needs it. I'll try to dig further and understand why, but in the mean time if anyone can explain why this is working, it would be nice.
This sdk can integrate you to handle both facebook and linkedin without any hassle. Also use valid url for linkedin callback.