how to add multiple markers on the google map just by url? - blackberry-10

I have an android application, I want to convert it to blackberry 10 , the google map is needed in the app,but the blackberry 10 do not support GoogleMap, the blackberry developer web site supply a way to replace it.The sample as below:
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView webView = (WebView) findViewById(R.id.mywebview);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://maps.google.com/?ll=36.97,
-122&lci=bike&z=13&t=p");
}
I cannot really understand it,I do not know how to add multiple markers on the GoogleMap via url? who can help me?

This worked for me the map was shown in a webview.

Related

How can create Google TTS button flutter?

I found this code but I need help turning it to button
when I clicked button speech hello world.
https://pub.dartlang.org/packages/flutter_tts#-example-tab-
This plugin requires Android SDK 21+, so you need to change project settings first. To do that open android/app/build.gradle, and change minSdkVersion to 21.
After that everything should work just the way it's described in the documentation and your button's click handler function may look like this:
FlutterTts flutterTts = new FlutterTts();
await flutterTts.speak("Hello World");

Java annotation using Pyjnius

I copied this code to use android native WebView in my Kivy application. Works perfectly :)
Now, I would like to bind my JavaScript with my Kivy application.
I've read through this guide:
...
/** Show a toast from the web page */
#JavascriptInterface
public void showToast(String toast) {
...
How can I create a PyJnius class that has #JavascriptInterface annotation?
Thanks!

Buttons in SWF file quickly make two click, With Eclipse ADT

Beginning, excuse my English.
I made an application with Eclipse (ADT) to run a SWF file, it worked without problems in older tablet, but to run this application on tablet like Samsung or Phillips, buttons swf file takes two click quickly.
If I compile the FLA with Actionscript 3 and AIR 3.2 APK generating a file, SWF buttons work well.
How could "slow down" the multitouch of the new tablet? imagine this causes the error, because by AIR, the SWF file is ok, then the problem is not new but tablet code.
My code is:
public class modulo1 extends Activity {
WebView mWebView;
#SuppressWarnings("deprecation")
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.modulo1);
mWebView = (WebView) findViewById(R.id.webView1);
mWebView.clearCache(true);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setBuiltInZoomControls(false);
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.getSettings().setAppCacheEnabled(false);
mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
mWebView.getSettings().setPluginsEnabled(true);
mWebView.loadUrl("file:///android_res/raw/modulo1.swf");
}
Thank you

how to download a file from server to local drive using GWT

What i want is that a user can select a complete path in his local drive and then a file (which is in the war folder of my app right now) will be saved in that selected user location
I am using File upload in GWT to upload my files , its working fine , will i use FileUpload for Download as well?
Also for a second option if there's a possibility to get the location which user have selected for example d:\downloadfolder, my problem will solve, i will do the rest !
below is the code for uploading , Please help me with Download
final String UPLOAD_ACTION_URL = GWT.getModuleBaseURL() + "upload";
initWidget(panelImages);
final FormPanel form = new FormPanel();
form.setAction(UPLOAD_ACTION_URL);
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
VerticalPanel panel = new VerticalPanel();
form.setWidget(panel);
FileUpload upload = new FileUpload();
upload.setName("uploadFormElement");
panel.add(upload);
// Add a 'submit' button.
panel.add(new Button("Submit", new ClickHandler() {
public void onClick(ClickEvent event) {
form.submit();
}
}));
form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
public void onSubmitComplete(SubmitCompleteEvent event) {
if(event.getResults().contains("DataBase Restored")){
Window.alert("Database Restored !");
}
}
});
panelImages.add(form);
You can't do this from GWT because JavaScript has no access to the local hard drive. The best you can do is initiate a download normally (e.g. show a link to a file that the user can click). Depending on their browser settings they'll either choose a location for the file or it will be downloaded to some default location. You cannot know that location with just JavaScript.
If this is a project requirement I think you'll need to include a heavier-weight plugin like java or flash.

Embedding youtube player in GWT (BST Player API)

I'm developing a GWT application. I need to embed a YouTube video in my application.
I've tried BST player API but I wasn't successful in bringing up the video on the player.
I've downloaded BST Player.jar and added it to my buildpath, then inherited the following jars in gwtapp.gwt.xml:
**inherits name ='com.bramosystems.oss.player.core.Core'**
**inherits name ='com.bramosystems.oss.player.youtube.YouTube'**
Then I tried the example given on BST page:
simplePanel = new SimplePanel();
add(simplePanel);
simplePanel.setSize("", "");
try {
// create the player, specifing URL of media
player = new ChromelessPlayer("http://www.youtube.com/watch?v=O3CZFfyed3M", "80%", "350px");
CustomPlayerControl cpc = new CustomPlayerControl(player);
FlowPanel fp = new FlowPanel();
fp.add(player);
fp.add(cpc);
simplePanel.setWidget(fp); // add player and custom control to panel.
} catch (PluginVersionException e) {
// required Flash plugin version is not available,
// alert user possibly providing a link to the plugin download page.
simplePanel.setWidget(new HTML(".. some nice message telling the " + "user to download plugin first .."));
} catch(PluginNotFoundException e) {
// required Flash plugin not found, display a friendly notice.
simplePanel.setWidget(PlayerUtil.getMissingPluginNotice(e.getPlugin()));
}
I could see the panel with the YouTube player but I couldn't see the video loading nor playing. I've tried player.playMedia() and it was of no help. Any ideas of how to proceed and make the video work?
You probably need to be passing this URL instead:
http://www.youtube.com/v/O3CZFfyed3M
I found a way to embed youtube videos in a GWT vithout using any external library. Integration level is very simple so you can not make any advanced use. Here it is the code fragment of a UIBinder template and its corresponding class:
Using and HTMLPanel put an object element like this:
<g:HTMLPanel>
<object ui:field="videoElement"
type="application/x-shockwave-flash"
width="640" height="480" data="">
</object>
</g:HTMLPanel>
#UIField
ObjectElement videoElement;
[...]
public void displayVideo(String videoId) {
String videoUrl = "http://www.youtube.com/v/".concat(videoId);
videoElement.setData(videoUrl); //change data attribute of object element
String innerHtml = "<param name=\"movie\" value=\""+ videoUrl +"\" />";
//add param element, of course yo can add as many param elements as needed to customize
videoElement.setInnerHTML(innerHtml);
}
To make it work I needed to put this video view inside a Panel and whenever I wanted to view / update the video clear the panel and add the video view again.
Hope this helps
I have created this GWT wrapper on top of YouTubes Iframe api library. Which makes it easier to use YouTube api inside gwt check https://github.com/pandurangpatil/gwt-youtube