Access to calendar from gwt - api

Is there a way to write in the standard calendar from the smartphone from my gwt application.
Which that I can make a new entry in the calendar from the gwt application.

If you have a native application that you GWT application is running inside, then the easiest way would be to expose a native class to GWT via javascript injection.
For example with Android, your GWT application would run inside a WebView with a Browser instance. This browser can provide methods to you GWT application like this:
myWebView = (WebView) findViewById(R.id.web_view);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.addJavascriptInterface(new GwtJavaJSImpl(), "injected");
The methods in GwtJavaJSImpl would then be accessible from GWT by calling the JavaScript method injected.methodXxx() like this:
public native void callInjectedMethodXxx() /*-{
$injected.methodXxx()
}-*/;
If you don't have a native application on your smartphone, you could generate a calendar file (e.g. event.ics) which you then could let the smartphone download. That file would then be automatically added to the device's calendar.

Related

Is it possible to use a locator for a webpage in an app that uses a webview?

I need to develop regression test automation for the app that switches to webview using selenium, appium.
Can the locator used in the web page be used as it is in the app web view environment?
thank you
It depends on how the views are built for the web and app.
There was a time we were able to use the same selectors for both web E2E and App with the same screens rendered in webview.

Why dynamic links in React Native are opening the browser first?

I'm trying to communicate two React Native apps using Firebase Dynamic Links, only in Android.
When I execute openLink with the URL of the other, I see the browser for a second, and then it opens the other app well.
I don't want to see an intermediate browser before open the other app.
I'm having that issue from app A to B, and viceversa.
So, why is the browser opening first? And how can I configure the apps in order to not open the browser?
it's default behavior of android devices.
usually if any link supported by app and its set default to open link then it will open directly otherwise android system opens browser and based on Link URI scheme navigate to app.
there is one solution,
You can create module (intent activity) which will launch that app directly.
Steps to follow
pass data from js to native module and from that use Intent class, set data and start it.
this was for Android use case.

Convert XUL application to web app

Is it possible to convert an existing XUL application to a pure web application without a complete rewrite? Are there any existing guides on doing this?
There is an existing project based on XUL / Mozilla Application Framework that I would like to see as a web application. But it seems that with FF4 this would no longer be possible.
You can use XUL Runner if you like to keep it like a desktop app or use the Ample SDK which supports XUL in HTML pages and it does a rendering using HTML and JavaScript.

Share functions between EXTJS and Touch Apps that follows MVC pattern - Sencha Workspace

I am creating an Web App and a Mobile App using Sencha
while doing so I am following sencha's recommended MVC pattern to develop these apps
Sencha recommends to create Worksapce and then create extjs and touch applications one by one inside the workspace to achieve code sharing between the apps.
from their documentation i understand that a piece of code thats shared between the two apps must go under the workspace directory
but i fail to understand how do you access this code from the respective Apps
presently i am creating the global functions inside a app and is available in that app only
Ext.define('MyApp.common.Util', {
statics: {
foo:function(){
...
}
});
and to access the function i use
requires:['MyApp.common.Util']
...
MyApp.common.Util.foo();
As u can see i can access function thats defined only under an app (MyApp..). can anyone provide me an example how to define a functions outside the app (within a workspace) and access them from various apps ?
Thanks
Check out the example app here: https://github.com/WebAppSolutionInc/sencha-cafe-townsend
They put the ExtJS and Sencha Touch app together with DeftJS https://github.com/deftjs/DeftJS

Is Sencha UI and SenchaTouch only meant for web applications accessed from device or for native apps too?'

As I am new to PhoneGap and SenchaTouch I want to know the basic information . I understand that sencha Touch is only for web applications accessed from device. I am correct Please clarify my doubt that is 'Is Sencha UI and SenchaTouch only meant for web applications accessed from device or for native apps too?'
Thank you
Lakshmi
Sencha touch is a web toolkit, provides API to create interface looks similar to Native UI. But, however it is still a web application with a native look. However, if you want to crate the native packaging (application build) and if you want to access the device hardware features like camera, sensor then you can go for PhoneGap. PhoneGap can warp the HTML and JavaScript code and helps you to generate native builds for each platforms.