Edited the content. Added screenshots.

This commit is contained in:
Evgeni Boevski 2015-09-14 13:02:50 +03:00
Родитель 627893f282
Коммит d280541f8b
4 изменённых файлов: 66 добавлений и 26 удалений

Просмотреть файл

@ -1,49 +1,89 @@
This application is an example for using the Offline Support provided by the Telerik Backend Services JavaScript SDK. You can find more information here: [Offline Support](http://docs.telerik.com/platform/backend-services/development/javascript-sdk/offline-mode/introduction).
---
title: "Telerik Deliveries Sample App for PhoneGap/Cordova"
slug: sample-backend-services-deliveries-hybrid
position: 1
publish: true
page_title: Telerik Friends Sample App for Windows Phone | Telerik Platform
description:
tags: Sample App, Application, Windows Phone, C#, dotnet, .NET, BaaS, mBaaS, Social, Analytics, Social Login
---
<a href="https://platform.telerik.com/#appbuilder/clone/https://github.com/telerik/platform-deliveries-hybrid" target="_blank"><img src="http://docs.telerik.com/platform/appbuilder/sample-apps/images/try-in-appbuilder.png" alt="Try in AppBuilder" title="Try in Telerik Platform" /></a>
# Telerik Deliveries Sample App for PhoneGap/Cordova
### Requirements ###
<a href="https://platform.telerik.com/#appbuilder/clone/https://github.com/telerik/platform-deliveries-hybrid" target="_blank"><img src="http://docs.telerik.com/platform/appbuilder/sample-apps/images/try-in-appbuilder.png" alt="Try in AppBuilder" title="Try in Telerik Platform" /></a> <a href="https://github.com/telerik/platform-deliveries-hybrid" target="_blank"><img style="padding-left:20px" src="http://docs.telerik.com/platform/appbuilder/sample-apps/images/get-github.png" alt="Get from GitHub" title="Get from GitHub"></a>
* Registration in Telerik Platform (https://platform.telerik.com/).
* A new or existing Backend Services project.
* [Overview](#overview)
* [Requirements](#requirements)
* [Configuration](#configuration)
* [Running the Sample](#running-the-sample)
### Showcased concepts ###
## Overview
This repository contains the Telerik Deliveries app for PhoneGap/Cordova. It is a sample mobile app demonstrating how to integrate and use the [Offline Support](http://docs.telerik.com/platform/backend-services/javascript/offline-support/introduction) and [Caching](http://docs.telerik.com/platform/backend-services/javascript/caching/introduction) features provided by the [Telerik Backend Services JavaScript SDK](http://docs.telerik.com/platform/backend-services/javascript/getting-started-javascript-sdk).
The detailed list of showcased features includes:
* Offline Support
* Switching between online and offline mode
* Data synchronization
* ClientWins conflict resolution strategy
* Offline files
* Integration with UI
* UI integration
* Caching
* Authentication Persistance
* Authentication Persistence
### Supported platforms ###
Similarly to all other Telerik hybrid apps, Telerik Deliveries runs on iOS, Android, and Windows Phone 8.
* iOS
* Android
* Windows Phone 8
## Screenshots
### Installation ###
![Login Screen](screenshots/login-screen.png)
![Main Menu](screenshots/main-menu.png)
![All Orders, device is offline](screenshots/all-orders-offline.png)
* Launch Telerik AppBuilder and clone this repository.
* Open the `config.js` file located in the base folder.
* Set the value for `Config.ApiKey` to the API key for your Backend Services project.
## Requirements
### Running the sample app ###
Before you begin, you need to ensure that you have the following:
You can test this app either on a device or using the AppBuilder simulator. More information of how to run your hybrid app created with Telerik AppBuilder on devices can be read here: [Running Apps on Devices](http://docs.telerik.com/platform/appbuilder/testing-your-app/running-on-devices/working-with-devices).
- **An active Telerik Platform account**
Ensure that you can log in to a Telerik Platform account. This can be a free trial account. Depending on your license you may not be able to use all app features. For more information on what is included in the different editions, check out the pricing page. All features included in the sample app work during the free trial period.
This app requires a specific content type and some data in your Backend Services project in order to work. Just launch the app and it will guide you through the process of data initialization.
- **Telerik AppBuilder** The sample app requires Telerik AppBuilder to run. This can be the in-browser client, the desktop client or the extension for Visual Studio.
For your convenience, the app always displays whether it works online or offline. You can simulate lack of Internet connection from the AppBuilder simulator. If you are testing on a device, you will have to turn off the WiFi and data connection to go in offline mode.
## Configuration
### What to test ###
The Deliveries sample app comes fully functional, but to see it in action you must link it to your own Telerik Platform account.
1. Make sure Internet connection is on.
To do that, set the API Key for your Telerik Backend Services project. This is a unique string that links the sample mobile app to a project in Telerik Backend Services where all the data is read from/saved.
1. Click the "Try in AppBuilder" button to clone the repository in AppBuilder.
An app called "My App" is created for you with an AppBuilder project set up.
2. Click **My App** in the navigation bar at the top to go the app home.
3. Create a Backend Services project.
4. Once the Backend Services project is ready, go to **Overview > API Keys**.
5. Take note of your API Key and API Master Key.
6. Go back to the AppBuilder project.
3. Open the `config.js` file.
4. Set the `Config.ApiKey` value to the API key of your Backend Services project.
5. Set the `Config.MasterKey` value to the API Master Key of your Backend Services project.
## Running the Sample
Once the app is configured, you can run it either on a real device or in the Telerik AppBuilder simulator.
To run it. follow the steps in the product's documentation: [Running Apps on Devices](http://docs.telerik.com/platform/appbuilder/testing-your-app/running-on-devices/working-with-devices).
After you run the app successfully, it guides you through a data initialization process which builds the necessary data structure in your Backend Services project and then creates sample data.
For your convenience, the app always displays whether it works online or offline. You can simulate lack of Internet connection from the AppBuilder simulator. If you are testing on a device, you have to turn off the WiFi and the data connection to go in offline mode.
> Ensure that the emulator or the device that you are using has Internet connectivity when running the sample.
One way to test the app is to follow this work flow:
1. Make sure the Internet connection is on.
2. Log in and browse the delivery orders.
2. Turn off the Internet connection and restart the application.
3. Result: you can still browse the delivery orders.
3. Turn off the Internet connection and restart the application.<br>
Result: you can still browse the delivery orders.
4. Change an existing item (enter comment or change status).
5. Turn on the Internet connection.
6. Result: Your change is synchronized to the cloud and you can see it in the Backend Services portal.
5. Turn on the Internet connection.<br>
Result: Your change is synchronized to the cloud and you can see it in the Telerik Platform portal.

Двоичные данные
screenshots/all-orders-offline.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 147 KiB

Двоичные данные
screenshots/login-screen.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 64 KiB

Двоичные данные
screenshots/main-menu.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 66 KiB