on 06-18-2013 7:12 AM
Hi Experts
We have developed many HTML/HTML5/JavaScript applications with third party tool. We want to make them hybrid application in SUP . These HTML files are generating the data from their own , so no backend access ( or MBO ) is required to start with . What's the best possible way to migrate existing HTML applications to SUP . I didn't find any documentation on the same in the sybase website or here in SCN. Any help will be appreciated .
Regards
Gairik
In addition to the online documentation describing how to create hybrid app packages manually or using the packaging tool,
, the following sample should help describe the use of the packaging tool:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gairik,
It depends which framework you are using. PhoneGap is the most popular and reliable framework.
Refer following blog link
For accessing SUP through Javascript in PhoneGap application we need to use the following steps.
public class MyClass
{
public String getMessage(){
return "Hello Java";
}
}
public class Main extends DroidGap
{
private MyClass mc;
@Override public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.init();
mc = new MyClass(this, appView);
appView.addJavascriptInterface(mc, "MyCls");
super.loadUrl(getString(R.string.url));
}
}
<script>
$(function(){
$("#phone").text("Message from native class: " + window.MyCls.getMessage());
});
</script>
MyClass is the java class where you are going to write the code for an MBO. It works like Model for your application.
Hope this helps you.
- Regards
ShashanK MarathE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Shashank for your reply . However, what I was looking for is to migrate my existing HTML applications ( developed using any third party tool, e,g., phonegap or may be simply in notepad ) to SUP as a hybrid application . David's response actually helped me to package my html application as a SUP based hybrid application . Regarding the data access , yes it is possible to access MBO after generating javascript MBO access API . So, I'm marking David's answer as the correct answer. However, thanks for your response to use phonegap . I will try it out soon.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.