Using Sitefinity Mobile App Builder with an Android Emulator
This will get you running with Sitefinity Box on an Android Virtual Device from the Eclipse IDE. I ran this with Android 4.2 (JellyBean). I will assume you can get android’s development environment and an AVD up and running on your own. I used the intel image for my emulator just because it is faster.
Project Setup
Create your Sitefinity project and setup your custom module to use for the Mobile App Builder. Create your mobile app and click on Download the app as ZIP file. We will get back to this file in a second.
IIS
Now setup your project to be hosted within IIS. (So you can browse to localhost without a port number). After that is setup and you can view your site by going to http://localhost we are going to have it listen on our machine’s ip address.
Open command prompt and replace ‘a.b.c.d’ with your own ip address (/ipconfig). I added my machine’s ip pluslocal host 127.0.0.1
netsh http add iplisten ipaddress=a.b.c.d
netsh http sho iplisten
create sitefinityemu com.sitefinityemu.SitefinityEmu SitefinityEmu
<!DOCTYPE html>
<
head
>
<
title
>Sitefinity</
title
>
<
meta
charset
=
"utf-8"
/>
<
meta
name
=
"format-detection"
content
=
"telephone=no"
/>
<
meta
name
=
"viewport"
content
=
"user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi"
/>
<!-- <link rel="stylesheet" type="text/css" href="css/index.css" />-->
<
link
href
=
"kendo/styles/kendo.mobile.all.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"kendo/styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"kendo/styles/kendo.default.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/main.css"
rel
=
"stylesheet"
/>
</
head
>
<
body
id
=
"mobileApp"
>
<!-- <
div
class
=
"app"
>
<
h1
>Apache Cordova</
h1
>
<
div
id
=
"deviceready"
class
=
"blink"
>
<
p
class
=
"event listening"
>Connecting to Device</
p
>
<
p
class
=
"event received"
>Device is Ready</
p
>
</
div
>
</
div
>-->
<
div
data-role
=
"view"
id
=
"tabstrip-home"
data-model
=
"sitefinityMobileApplication.viewModel"
class
=
"login-scrn"
>
<
hgroup
>
<
h1
id
=
"moduleName"
data-bind
=
"html: moduleName"
class
=
"app-name"
></
h1
>
<
h2
class
=
"sf-name"
>Sitefinity</
h2
>
</
hgroup
>
<
ul
class
=
"km-listview km-list km-listinset"
>
<
li
>
<
label
for
=
"username"
style
=
"display: inline-block;"
>Username</
label
>
<
input
type
=
"text"
id
=
"username"
data-bind
=
"value: userData.username"
/>
</
li
>
<
li
>
<
label
for
=
"password"
style
=
"display: inline-block;"
>Password</
label
>
<
input
type
=
"password"
id
=
"password"
data-bind
=
"value: userData.password"
/>
</
li
>
</
ul
>
<
div
class
=
"btn-wrp"
>
<
button
class
=
"km-button"
id
=
"btnLogIn"
data-bind
=
"events: click: logIn"
>Log In</
button
>
</
div
>
</
div
>
<
script
type
=
"text/javascript"
src
=
"cordova-2.7.0.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"js/index.js"
></
script
>
<
script
type
=
"text/javascript"
>
app.initialize();
</
script
>
<
script
src
=
"kendo/js/jquery.min.js"
></
script
>
<
script
src
=
"kendo/js/jquery.cookie.js"
></
script
>
<
script
src
=
"kendo/js/kendo.mobile.min.js"
></
script
>
<
script
src
=
"scripts/jQueryMapPlugins/js/jquery.ui.map.js"
></
script
>
<
script
src
=
"scripts/jQueryMapPlugins/js/jquery.ui.map.extensions.js"
></
script
>
<!-- <script src="kendo/js/kendo.all.min.js"></script>-->
<
script
src
=
"scripts/config.js"
></
script
>
<
script
src
=
"scripts/address.js"
></
script
>
<
script
src
=
"scripts/everlive/reqwest.js"
></
script
>
<
script
src
=
"scripts/everlive/rsvp.js"
></
script
>
<
script
src
=
"scripts/everlive/underscore.js"
></
script
>
<
script
src
=
"scripts/repository.js"
></
script
>
<
script
src
=
"scripts/sitefinityAjax.js"
></
script
>
<
script
src
=
"scripts/mobileApp.js"
></
script
>
</
body
>
</
html
>
Hi Kristian,
Thnak you very much for sharing your research with the community.
We really appreciate your input, and I believe the community members interested in Android development and using Eclipse would benefit from it greatly.
I have updated your Telerik points accordingly, as a token of appreciation.
Regards,
Boyan Barnev
Telerik