As all of know that Google has launched new APIs for Chrome-Cast which are public.
So while developing it for an android, they have given some sample codes on Github.
While reading documentation of android app, they have clearly mentioned that to launch receiver file on Chrome-Cast we need to create GoogleApiClient and then we can connect to it.
But the sample app uploaded over here, is not calling APIs regarding launching Receiver app and creating Client (or maybe I am not aware of of APIs are being used to call receiver file). So I am facing trouble to write my own app. So can anybody tell where this part is being carried out or can anybody can give me another way to do it and explain me the workflow of that app??
NOTE: I WANT TO DO IT FOR VIDEOS
The sample app uses the CastCompanionLibrary, which
is a library project to enable developers integrate Cast capabilities into their applications faster and easier.
Related
The DialogFlow can custome intent, but I want to add more function in my android app, such as weather, alarm or more. Then the google assistant Can satisfy me, but I don't know how to implement it, I can't find the demo or interface for java, who can help me?
It is not clear if you want to embed GA to an Android App or have a complete independent GA app that you can invoke on your Android Device.
For the embedding stuff probably following links may help you
building a gRPC library and getting started with gRPC for Android.
For the second case, here is what I would do:
1. Create different intents in my Dialogflow agent - one to ask weather info, one for setting alarm, etc.
2. Create a webhook
3. In the code, based on the identified intent, do your stuff - if the weather is identified, get info from weather services, if the alarm is identified, set the alarm.
Hope, this helps you.
I'm in a development of an Android app which uses a REST API in a server. In the request it needs a number and an API endpoint, e.g.:
http://apilocation/endpoint/number
What I'd like to do is to make a QR code, that will download the app from Google Play if it's not installed, or if it's installed then it'll open up the app with the required parameters. Is it possible somehow, or I should put a QR code reader activity in the app, and the users have to use that?
There is a StackOverflow thread which could be cool for you. And this gist could help you, it's pretty well done and, on your side, you need to define an Intent Filter in order that your app could be triggered by the custom-protocol of the JS I put a link of.
I have an android application that is designed to receive push notifications via GCM. When I initially designed the application, I used a "deprecated" tutorial (merely because it was one of the most in-depth I found) and my dev phone was running API 2.4, so I was able to get the service up and running without much issue.
Now, my development device is running Android version 4.4.2, so my goal is to "upgrade" my application to handle GCM properly for all devices (for now, lets ignore the fact that I'll have to differentiate how to handle Push Notifications depending on API level).
I attempted to follow the Android Developer tutorial for creating a demo client app for Google Cloud messaging, which can be found here. https://developer.android.com/google/gcm/client.html
While I hate to sound like I want to ignore to smart coding practices, this official walk through was a little big in terms of scope (My application supports Phonegap, and while I think implementing native GCM is much easier than using the PushPlugin for Phonegap, I don't want to handle more than is absolutely necessary in my Java code)
As a last ditch effort, I simply downloaded the demo gcm code from the source they provided here: https://code.google.com/p/gcm/source/browse/samples/?r=1ca8e646c517310e2d46a6a6eda74106b8084fc5
I attempted to import the gcm-demo-client application, and although I know my SENDER_ID, I don't understand anything about the SERVER_URL. The documentation provided by Android Developers talks very generally about HTTP vs. CCS, and I'm struggling to grasp where this server fits into the grand scheme of all that is Google Cloud Messaging.
Assuming I download the gcm-demo-server project directory they included (which seems to be some kind of Java Project), how do I host it? My previous deprecated GCM simply used a basic android application in which I would submit a form containing the device Registration Id, and a message with a title and context. Unfortunately, I can't figure out how to import their demo-server into Eclipse (since Eclipse doesn't think it contains ANY project files), AND I cannot seem to understand how this server connects with my application in any capacity.
TL/DR Summary of questions:
1.) How can I go about "hosting" the gcm-demo-server from URL #2 above?
2.) If I can just copy the Registration Id from my client app to the clipboard, can I just use my "android server" application to send my messages?
3.) Maybe it's just me, but I don't see anything resembling a Receiver class in the gcm-demo-client project directory, only a GcmIntentService. How can there be an intent when the application can't even properly handle messages?!
Thank you for your patience and help!
(P.S. - I cannot provide any code- however since the code in question is merely the provided Android Developer GCM demo code, this hopefully won't be a big issue)
1) There are many companies that offer server hosting services. You should choose one.
2) If you copy the registration Id manually, and hard code it in an application that serves as a "server", you don't need to host a real server, though that would only work in development. In production, assuming you'll have multiple users who install you app, you'll need a real server that receives and stores the registration IDs of all of them.
3) The demo client project you are referring to is old, and relies on a deprecated library (gcm.jar) which contains a default implementation of the BroadcastReceiver, which receives the messages from GCM server and starts the intent service. If you refer to the current demo app, you'll find a BroadcastReceiver class.
The demo app might not work because it is a gradle project and you should preferably open it in Android Studio. That might be why it could not see it as an Android project at all.
I have recently started implementing GCM myself and it is not difficult at all. I am using AppEngine for holding the backend part of my app. In Android studio, there is a very quick and easy way to generate both the android client and the backend part including the cloud endpoints and even a web interface for sending the messages (you don't need to use it though).
I followed this tutorial https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/GcmEndpoints
Maybe this is not a fully satisfying answer for you, but I found the code very much readable and I understood how this stuff works.
I have created app engine app (using Python)(devappdemo.appspot.com).
Now i want to create an android app for the same which should access the same datastore.
I googled it and i found that it can be done with CloudEndPoints but dont know from where to start how it can be done. Please suggest any tutorials or step by step instructions to do it.
Google Cloud Endpoints would be the easiest way at the moment to get started with it. Here is the overview and tutorial.
Cloud Endpoints will help you generate the Endpoint API (REST API) and it also helps to generate the Android client code, that you can easily integrate into your Android application.
If you already have exposed your Python application over Web Services, you could directly use that from your Android application.
I want to make a application that has similar function as Android Beam, but the question is how to get the content of those running apps. For example, if the web browser, Youtube and Google Map is running, how do I get the web address, the video link and the location? Thank You.
You will only be able to get information like this if the running application provides it through some sort of global access method, e.g. a service or content provider. It is highly unlikely that any application will do this as it has some serious security/privacy implications.
You will only be able to develop such an application by writing a system application aka you'll need root permissions.
The best approach in my opinion will be that you look through the Android Beam source code, to see how it's done there. The official API will not help you here. Since the functions used in such system applications is not in the API there is no guarantee that it will work with future versions of Android, so be careful.
I doubt that this will be an easy task. If it's really similar to Android Beam, try building your code on top of the official source.
For Android Beam, the app itself is sharing the data. The NFC background service gets the data to be shared via Android Beam delivered to it by the app's Activities. An Activity either calls at the beginning (e.g. in onResume()) the method NfcAdapter.setNdefPushMessage() to share a static piece of data or it calls NfcAdapter.setNdefPushMessageCallback() to register a callback that will create the data to be shared at the moment Android Beam becomes active.
A number of the standard Android and Google apps have been extended to support this in Android 4.0 ICS, for example Browser, Gmail, Maps, People and Youtube. Apps that have no support for this, will by default share a link to the download page of that app in the Google Play store.