I created a CastRemoteDisplayLocalService descendant following the official docs.
OnCreate is called, onCreatePresentation never. What can be the reason behind this?
I used this code as an example: https://github.com/pasha656/Chromecast/tree/master/CastDisplay I had different package names but the same app ID - maybe this can be a problem. I tried to search the official docs whether app IDs and packages are linked together - no success, no info so far.
The above referred project and my project are calling onCreatePresentation() for me. I am not sure what are you missing
I would recommend you to follow the below steps and see if you can figure out something
Download this project : https://github.com/syatam/Cast-Remote-Display
Import to Android Studio and install it on Android mobile
App launches => Click on PLAY and select the chromecast device
When the app is connected with chromecast device, you should see onCreatePresentation() is being called in your logcat messages.
Share me your sample project if you are unable to figure out. I can take a look at it.
Related
I am working on a Google glass Android app. I have installed the glass development kit (GDK) in Android SDK. Now I created a glass project using Android Studio (Version 3.3.2). The newly created project is showing an error "Default Activity not found" in run->edit configuration.
Please refer the screenshot for the error.
1.
And 2. By clicking run->Edit Configuration in menu.
I have searched a lot on Google and found many articles regarding the same. All are suggested to set the edit configurations option like below.
Module: app
Package: Deploy default APK
Activity: Launch default Activity
Target Device: USB Device
I did the same, but no one is working for me. After spending the whole day to make it work, I came here. This error is due to the Launcher activity, because there is no launcher activity in Google glass project instead it uses Voice Trigger intent filter. It is similar to wearable apps they also don't have the launcher activity.
Android Studio won't let you use a standard run configuration without specifying a launcher in the manifest.
You could try using the gradle command line instead:
./gradlew installDebug
In case you haven't resolved the issue. I came across similar issue before, two ways worked for me:
Choose "Nothing" as the option. You will be able to run the app manually on the Glass, but your debugger won't work straight away. You have to manually attach the debugger to the process. You may also have to use logcat if there is a bug in the launching process.
Specify an activity (whichever is associated with voice trigger).
Also, I noticed that you created the app using Kotlin. Kotlin activity didn't work in my case, throwing exceptions associated with nullable var when resuming the activity. Non-activity classes worked fine. Please let me know if Kotlin activity worked in your case.
I am quite new to azure hubs. But spent three days to understand the flow(to use in xamarin forms).
Currently tying to link with android only(through xamarin forms). So when I thought everything needed is ready(GCM key and azure access policies) from my side, I started coding using vs2015.
First thing I did was creating "Blank portable cross platform" project.
Then,tried to install Microsoft.Azure.NotificationHubs package. PFA
But I am getting following errors( related to Profile259).
I spent whole day to understand what error is saying and I understood that package is expecting different target framework than what I am referring.
So I tried changed to other versions and through some blogs I found that maybe this Profile259 directory is missing.But it's all there.
Package is expecting .Net Framework 4.5 Full Profile. I cross checked it by following the link
I updated my azure version.Nuget package is also latest.
So what could possibly go wrong.
Please guide me in right way to get push notifications in devices.
PFA below.
I had to add it as a component. Go to the Components under the Android and iOS project, select edit components off the context menu, and add the "Azure Messaging by Xaramin" component. You'll probably have to download it by clicking "Get More Components".
If you're working on Android only for now, try removing all other targets from screenshot #2. There's a chance the error message is caused by one (or all) of the Windows targets.
I've been searching for a couple of days, including on this website. What I have found would be useful, however I find that I'm unable to follow them correctly. The questions here have no answers either.
Firstly, when I attempt to add BasegameUtils to the project and import whats needed, Eclipse cannot find them. I don't understand why, because I have imported it and marked it as a library.
This is not helped by the fact that all of the examples have their mainactivity in the folder where the API is. I have already built a full application, and I do not understand where I'm supposed to put mine.
The whole thing is incredibly confusing, and any help, or examples would be lovely.
https://developers.google.com/games/services/android/init
You need to implement baseGameUtils as a library or module depending on your IDE.
public class Main extends BaseGameActivity
And then you call this to unlock the achievement.
Games.Achievements.unlock(getApiClient(), getString(YOUR_ACHIEVEMENT_CODE));
These code samples really helped me first time round.
https://github.com/playgameservices/android-basic-samples/tree/master/BasicSamples/libraries/BaseGameUtils
The tricky part isn't the code, it's the configuration of your project, make sure to check on the play developer console that you have set up your testing account properly and your achievement codes are correct etc.
Okay, the solution was not simple. The guides seem to favour Android Studio, which implement a script to create BaseGameUtils. The BaseGameUtild that I was importing with Eclipse was not the correct one. I ended up searching for a valid one, and downloaded it.
The second thing I was doing wrong was not updating the SDK to version 20. Now, with the Play Services Lib in the extras, I could import the updated version.
After that, I discovered that gms.; actually must be written as com.google.android.gms..;. With this in line, I am now able to properly implement everything.
Thank you to those who helped.
I would be extremely grateful if someone could walk me through the process of configuring my facebook app to accept connections from my android scanner build of my steroids app. Specific areas that I am not entirely clear on are:
Generating a keystore for my app
Hashing the keystore
Configuring the Android build settings
Configuring the facebook settings within Facebook. With specific attention to what Class Name / activity I want facebook to launch, and how to ensure my Class Name and package name are consistent with my Android build settings.
I've been fighting with this for a while, and can't help but feel as though I am missing something simple.
I'm not sure if you have gone through the official documentation or not; but they have explained each steps that you've mentioned step by step: https://developers.facebook.com/docs/android/getting-started/
Try for once (if not tried yet), and if you find any specific problems post your questions here (I don't think you'll find any after reading the doc)
I had the exact same issue.
I have used Android Decompiler to find the main class.
In my case it was: com.appgyver.runtime.standalone.chromium.MainActivity.
Looks pretty generic. Might work in your case too.
I am trying to implement a custom barcode scanner. If I have Zxing installed the app works fine but If I do not the application will error out and you have to force close. I have added IntentIntegrator.java and IntentResult.java into the SRC folder of my project and changed the package name to point to my package, although Im not sure if that is what I am supposed to do. It still will not work. Am I setting this up correctly? I have found many pages that tell me to use the files but not how to set them up to work.
I would like it to smoothly direct the user to download the zxing app from the market if it is not installed on the client phone.
It's because you are not handling ActivityNotFoundException, or checking first to see if the app is installed. That is up to you. But, if you used the provided integration code, it would do this all for you. See http://code.google.com/p/zxing/wiki/ScanningViaIntent
It's not going to launched your app though, no.