-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
239 lines (199 loc) · 10.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<title>Digital Virgo - Direct Carrier Billing SDK</title>
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- Mobile Internet Explorer allows us to activate ClearType technology for smoothing fonts for easy reading -->
<meta http-equiv="cleartype" content="on">
<!-- Le styles -->
<link href="css/bootswatch/Cosmo/bootstrap.min.css" rel="stylesheet">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/black-tie/jquery-ui.css" rel="stylesheet">
<link href="css/jquery.tocify.css" rel="stylesheet">
<link href="css/prettify.css" rel="stylesheet" type="text/css">
<link href="css/styles.css" rel="stylesheet" type="text/css">
<link href="css/rainbow/themes/tomorrow-night.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="css/rainbowlines/theme.css" media="screen" />
<link href="https://fonts.googleapis.com/css?family=Allura" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link href="../assets/ico/favicon.ico" rel="shortcut icon">
<link href="../assets/ico/apple-touch-icon-144-precomposed.png" rel="apple-touch-icon-precomposed" sizes="144x144">
<link href="../assets/ico/apple-touch-icon-114-precomposed.png" rel="apple-touch-icon-precomposed" sizes="114x114">
<link href="../assets/ico/apple-touch-icon-72-precomposed.png" rel="apple-touch-icon-precomposed" sizes="72x72">
<link href="../assets/ico/apple-touch-icon-57-precomposed.png" rel="apple-touch-icon-precomposed">
</head>
<body style="background-color:white">
<div >
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="margin-bottom:0px;">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header; max-width: 100%; height: auto;">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Digital Virgo - Direct Carrier Billing Sdk</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
</ul>
</div>
</nav>
<div class="container-fluid" style="margin-top:50px;">
<div class="row">
<div class="tocify col-sm-3 col-md-3">
<div id="toc">
<img src="img/logo.png">
</div><!--/.well -->
</div><!--/span-->
<div class="col-sm-9 col-md-9">
<div class="">
<h1>Direct Carrier Billing Android/iOS Sdk</h1>
<br><br>
<h2>Description</h2>
<p>Documentation and example of Digital Virgo Direct Carrier Billing (from now on DCB) SDK for Android (Including Android TV) and iOS (Including tvOS)</p>
<p>Following this guide your app will be techically enabled to be promoted and integrated with Digital Virgo mobile payment.</p>
<p>After the integration of the sdk the resultant app can check if the user coming from Digital Virgo acquisition (optionally with explicit login with msdisdn+pin) and can check expiration date and several informations.</p>
<br>
<p>This integration can be used in apps already published on Google Play/App Store or only in case of Android environment, outside Google Play.</p>
</p><br><br>
</div>
<h2>Requirements</h2>
<br>
<p class="well">
<b>Android Studio ™</b> with Gradle 2.x+ <br>
or<br>
<b>XCode 10+ ™</b> with Carthage
<br>
<br>
Java/Kotlin/Swift
</p>
<br>
<h2>Getting Started with Android java integration</h2>
<br>
<!--<p>Let's say you have an app and this is the normal flow of your app launched from the home screen.
<br><span class="note"><strong>Note: </strong>At the end of the steps you can take a look at the resultant launch flow after SDK integration</span><br>
<img src="img/case0.jpg" class="img-fluid" style="max-width: 100%; height: auto;" alt="Responsive image"><br>
<p>
<p>Then we can start</p><br><br>-->
<p>Follow this documention that you find on this link <a href="https://github.com/docomodigital/DcbSdk/raw/master/android/doc/AndroidDoc.pdf">DCB Android Documentation</a></p>
<br>
<br>
<h2>Getting Started with iOS swift integration</h2>
<p class="well">
You can download this project on <a href="https://github.com/dvs-devtools/DcbSdk-iOS"> iOS App Test</a> for test and see the behavior.
</p> <br>
<br>
<h2>Step 1 / 4 - Download dependencies with carthage</h2>
<p class="well note">
Create a Cartfile or add belows line on Cartfile
<br><br>
Open the terminal and run "carthage update". This will fetch dependencies into a Carthage folder and build each source based framework or download the pre-builded framework.<br>
<br>
<span class="note"><strong>Note: </strong>This SDK support the Carthage dependency. If the first time that you use Carthage, you can learn more on this link https://github.com/Carthage/Carthage</span>
</p><br>
<br>
<h2>Step 2 / 4 - Add framework to your project</h2>
<p class="well note">
On your application targets’ General settings tab, in the “Linked Frameworks and Libraries” section, drag and drop the "DCBApiExt" and "Newton" frameworks from the Carthage build folder on disk. <br>
</p>
<br>
<br>
<h2>Step 3 / 4 - Build Phases settings</h2>
On your application targets <code>Build Phases</code> settings tab, click the + icon and choose <code>New Run Script</code> Phase. Create a Run Script in which you specify your shell <code>(ex: /bin/sh)</code>, add the following contents to the script area below the shell:<br>
<br>
<code>/usr/local/bin/carthage copy-frameworks</code><br>
<br>
Add the paths to the frameworks you want to use under “Input Files". In our case:<br>
<br>
<p class="well note">
<code>$(SRCROOT)/Carthage/Build/iOS/DCBApiExt.framework</code><br>
<code>$(SRCROOT)/Carthage/Build/iOS/Newton.framework</code><br>
</p>
<br>
</span>
</span>
<br><br>
<h2>Step 4 / 4 - Add the user verification</h2>
<p class="well note">
You can now implement the code for this SDK, on you project:
</p>
<!--<span class="note">Just after the <code>super.onCreate(savedInstanceState)</code> </span>-->
<pre>
<code data-language="swift">
import DCBApiExt
var dcbApiClient: (baseDomain: String, confInfoDomain: String, apikey: String, catalog: String, country: String, namespace: String) {
return ("<baseDomain>", "<confInfoDomain>", "<key>", "<service-key>", "<country>", "<storage-space>")
}
let client = DCBApiClient(baseDomain: dcbApiClient.baseDomain,
confInfoDomain: dcbApiClient.confInfoDomain,
apikey: dcbApiClient.apikey,
catalog: dcbApiClient.catalog,
country: dcbApiClient.country,
namespace: dcbApiClient.namespace)
DCBUserManager(client: client).checkFlowDCB(isActive: false) { date in
if let dcbUser = DCBUserManager.dcbUser {
//User is recognised as Digital Virgo Acquisition
if let date = date {
//User is subscribed
}
else {
//User expired, not subscribed
//user must pay again to access the product
}
}
else {
//Normal user discover the app from AppStore
}
}
</code>
</pre>
<br>
<br>
<h2>Hooray! You have finished the integration.<br>
Do you have the expected result? No? <br><br>Get in touch with Native apps team <a href="mailto://[email protected]">[email protected]</a></h2>
<p>
<!--<img src="img/case1.jpg" class="img-fluid" style="max-width: 100%; height: auto;" alt="Responsive image"><br>
<img src="img/case2.jpg" class="img-fluid" style="max-width: 100%; height: auto;" alt="Responsive image">-->
<br>
<br><br><br>
<p style="font-size: 24pt; ">Best from<br><font style="max-width: 100%; height: auto; font-size: 48pt; font-family: 'Allura', cursive;">Native App Team</font>
</p>
</div>
</div><!--/row-->
</div><!--/.fluid-container-->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/rainbow/rainbow.min.js"></script>
<script src="js/rainbow/language/generic.js"></script>
<script src="js/rainbow/language/html.js"></script>
<script src="js/rainbow/language/css.js"></script>
<script src="js/rainbow/language/javascript.js"></script>
<script src="js/rainbowlines/rainbow.linenumbers.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.tocify.min.js"></script>
<script src="js/prettify.js"></script>
<script>
$(function() {
$("#toc").tocify({ selectors: "h2, h3, h4", scrollTo: 60, highlightOffset: 60, extendPage: true });
prettyPrint();
$(".optionName").popover({ trigger: "hover", container: "body" });
$("a[href='#']").click(function(event) {
event.preventDefault();
});
Rainbow.color();
});
</script>
</div>
</div>
</body></html>