How can we get google map api key for flex application? - apache-flex

How can we get google map api key for flex application?
I am using flex web application which display google maps, it is working fine in local host
but when i deploy in server,application gives error.
**
Initialization failed: please check the API key, swf location, version
and network availability.
**
How can i resolve this problem, plez suggest me.
Thanks in advance

First, understand that the Flash Maps API is deprecated, and could be turned off in less than 2 years. So if you're doing development on a project that is going to stick around, you should use the JavaScript Maps API.
If this is an existing application and you moved domain or for some reason the key isn't working, here are the directions to request a key:
https://developers.google.com/maps/documentation/flash/intro#API_Key

Related

Resource does not contain a definition for Raw while migrating resources in a MAUI app and how to load them

While migrating a Xamarin forms app, I find my self having this Android specific code that try to load my sound resource with a resource id
MediaPlayer.Create(Android.App.Application.Context, Resource.Raw.beepok);
I see that maui is bunding everything on Resources\Raw\** as MauiAsset
How i can still get the resource id?
It seem that AndroidResource still works, it seem that i was hit a build cache of sort, after clean and restarting vs the resource is available

Check for PNR existence from JS in a web RedApp

We are creating a web RedApp from SabreRedWorkspace and we need to check for the existence of a valid PNR before adding some passive segments.
We need to do it from an Angular app, and we can't find ant doc or example about it. Everything talks about RestAPI or the new NativeAPI and we can't find anything about web RedApps
Any help? Someone could point us to any doc or example?
You can use Javascript API for that, using SrwApi3.retrievePnr("1.0.0") which is injected on the DOM for Web RedApps.
Please make sure to download the latest SDK from https://beta.developer.sabre.com/guides/travel-agency/sdks/sabre-red-360-resources, version 19.5, there where changes on this release exactly about "Get PNR" APIs.
For more documentation, you can check on the SDK documentation folder : [extracted dir]/red-app-sdk-3.0-19.5/documentation/htmls/get_pnr_(web_api).html, ob by navigating from index->New Sabre Red Workspace Developer Toolkit->Sabre Services 3.0, Get PNR (Web API)
Also theres sample code provided on SDK, look for the compressed project under samples folder : com.sabre.redapp.example.webkit-1.0.8-SNAPSHOT-v20190516-1622.zip

Google Drive API - Example code is not working

I want to use Google API to transfer SharePoint Documents to Google Drive using dot net. For that to happen I want to use this link Google Quick Start.
I have followed every little piece of information. It states in beginning "Complete the steps described in the rest of this page, and in about five minutes you'll have a simple Drive app that uploads a file to Google Drive" but it is not true.
I am trying to run this sample example since yesterday but failed.
// Register the authenticator and create the service
var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description, CLIENT_ID, CLIENT_SECRET);
var auth = new OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthorization);
So it seems that this code example is outdated and Google APIs have been upgraded.
Here comes the warning
[Obsolete("GoogleAuthenticationServer is not supported any more and it's going to be removed in 1.7.0-beta. Consider using the new Google.Apis.Auth NuGet package which supports .NET 4, .NET for Windows Store apps, Windows Phone 7.5 and 8 and Portable Class Libraries as well")]
Another code
var service = new DriveService(new BaseClientService.Initializer()
{
Authenticator = auth
});
And the error
Cannot implicitly convert type 'Google.Apis.Authentication.OAuth2.DotNetOpenAuth.NativeApplicationClient' to 'Google.Apis.Http.IConfigurableHttpClientInitializer'. An explicit conversion exists (are you missing a cast?)
Then I was looking for [latest release samples] there I found the source files.
I was not able able to run the sample also.
Here I was successfully authenticated but then had error for redirect Uri
My Client_Secrets.JSON looks like, as you can see I have set default redirect Uri to http://localhost/.
{"web":{"auth_uri":"https://accounts.google.com/o/oauth2/auth","client_secret":"secret","token_uri":"https://accounts.google.com/o/oauth2/token","client_email":email","redirect_uris":["http://localhost/"],"client_x509_cert_url":"aa#developer.gserviceaccount.com","client_id":"id","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","javascript_origins":["http://localhost:53404/"]}}
Now I can run this application but as mentioned getting error
Error: redirect_uri_mismatch
The redirect URI in the request: [[http://localhost:2430/authorize/]] did not match a registered redirect URI
I really don’t know from where this port number comes and from where this authorize comes. As you can see in my JSON, I have not set anything similar.
I am using VS 2010 SP1 Ultimate and Windows 7 home Basic.
I have tried to give complete information and my end goal is upload document in Google drive.
The tutorial you are following uses an older version of google.apis thats why you are seeing the not supported. Here are a couple of tutorials on how it works with the new version of the api.
http://daimto.com/google-oauth2-csharp/
http://daimto.com/google-drive-api-c/
Take a look in https://code.google.com/p/google-api-dotnet-client/source/browse/Tasks.ASP.NET.SimpleOAuth2/Default.aspx.cs?repo=samples. It's a Task API ASP.NET sample. As you can see you need to add several lines of code, but it works.
I downloaded the samples Eyal mentions and got that compiling before integrating with my own app. .Net needs to be 4 although it states it supports higher.
You have to set the redirect URI in the google developer console, not in your JSON. In your case, you would want to set it to http://localhost:2430/authorize/.

Embedding a Flex Google Map in a WordPress Page

I'm embedding a Flex app in a WordPress page using Matt Carpenter's great plugin. It's a map created using Google Maps' Flash API.
I'm getting an initialization failure. Is that because the API key is in the Flex app and
Google can't "see" it?
This is the error that I'm getting:
Initialization failed: please check
the API key, swf location, version and
network availability.
Or do I have something else going on? Any suggestions?
Generally, the API key can only be used on 1 domain. Try creating a new key that's specifically to be used for online files. Use the other key you already have for offline testing.
Lewis

404 Error using Flash Builder 4 BlazeDS wizard

My issue this time around is trying to use the new DCD BlazeDS wizard in Flash Builder 4. If I set my project up as a combined Java/Flex app I am unable to connect to the RDS servlet using the wizard. I get a 404 error every time.
I'm certain the service is set up correctly since my app can access the exposed java classes and BlazeMonster can see the exposed services.
Is anyone else having this issue and if so has anyone found a work-around? I'd very much like to use the code generation features of the wizard for my project.
Thanks as always,
Codeflayer
You also need to make sure you have the RDSDispatchServlet setup in the web.xml config file.

Resources