Showing posts with label ideamart. Show all posts
Showing posts with label ideamart. Show all posts

Idea Pro ඇප් නිර්මාණය - Provisioning



ideamart තුල idea pro app එකක් නිර්මාණය කිරීමේ පළමු පියවර වශයෙන් එය ideamart platform තුළ ලියාපදිංචි කරගත යුතුය. එ් සදහා idea pro තුළ ඇති Create Application යන සබැදිය (link) ක්ලික් කරන්න.

දැන් එහි Basic Configurations යටතේ ඔබගේ App එකෙහි තොරතුරු ඇතුලත් කළ යුතුයි.






Application ID

This is an unique identity for an App. This will be auto generated number from Ideamart
මෙය Ideamart මගින් ලබාදෙන අංකයක් වන අතර, APP එක සදහා අනන්‍ය වේ.

Application Name

You can choose a suitable name for your application. It can be include characters, numbers. You can only use 9 characters for your app's name.

ඔබ නිර්මණය කිරීමට අදහස් කරන යෙදුම සදහා සුදුසු නමක්  තෝරාගත යුතුය. එහිදී අක්ෂර සහ ඉලක්කම් යොදාගත හැකිවන අතර, උපරිම වශයෙන් අක්ෂර 9ක් භාවිතා කළ හැක.

Application Description

You need to give little description about your app here. It must be clear.
ඔබ නිර්මාණය කිරීමට අදහස් කරන යෙදුම පිළිබද කෙටි සහ නිරවුල් හැදින්වීමක් සිදුකරන්න.

Allowed Host Address

Here include the IP address of the cloud storage that host your app. If your files are hosted on ideamart sever, you can give 184.73.170.96 here.

ඔබගේ යෙදුම තැන්පත් කර තිබෙන සර්වරයේ IP ලිපිනය මෙහි ඇතුලත් කරන්න. ගොනු ගබඩා කර තිබෙන්නේ ideamart hosting වල නම්, 184.73.170.96  යන IP ලිපිනය මෙහි ඇතුලත් කරන්න.

White Listed users

Here insert your telephone number(s). When the app is on Limited Production, you can only test the app from these numbers.
ඔබගේ දුරකථන අංකය/අංක මෙහි ඇතුලත් කරන්න. ඇප්ලිකේශනය "Limited Production" අවස්ථාවේ පවතින විට, අත්හදාබැලීම් සදහා භාවිත කළ හැක්කේ මෙහි ඇතුලත් දුරකථන අංක පමණි.

Black Listed Users

Telephone numbers add on here can't use the application.
මෙහි ඇතුලත් කරන දුරකථන අංක මගින් ඇප්ලිකේශනය භාවිතා කළ නොහැක.

Production Start Time

Date and time you wish to start the production of the app.
ඇප්ලිකේශනය ක්‍රියාත්මක වීම ඇරඹිය යුතු දිනය

Production Expiration Time

The last date and time of the active production
ඇප්ලිකේශනයේ ක්‍රියාකාරීත්වය අවසන් කළයුතු දිනය











How to use subscription API on ideamart platform


Please download sample code (PHP) from here.



Files :


  1. subscription.php  This file includes all the functions related to subscription API
  2. notification.php   This script collects the subscription notifications, which send to the app from ideamart (or simulator)
  3. definitions.php    This file contains Ideamart API endpoint data
  4. log.php                 That helps to record activities.







First, add following script on the head of the PHP script for initializing settings


<?php

include_once "definitions.php";
include_once "subscription.php";
$sub = new Subscription();

$AppId = "APP_000000";
$Password = "";
$SubscriberId ="tel:94771234567";





How to register a user?


You can use following code in any script. But you need to get the masked user address (like "tel:B%3C4P+QB59sTSmJbLNMvHJC3VyqatcWavD6kWPkPy3GtLbSE5Nyv4PC6JZOaHsE1hver") from the ideamart side.




$SubscriberId ="tel:94771234567";
// Register new user
$sub->RegisterUser($AppId,$Password,$SubscriberId);



How to unregister a user?


You can use following code in any script. But you need to get user address (like "tel:94771234567") from the ideamart side.




$SubscriberId ="tel:94771234567";
// Unregister new user
$sub->UnregisterUser($AppId,$Password,$SubscriberId);




Need to know how many users currently registered on your app?


Use following code, you can get the number of active subscribers

 (Please note that this function gives only the count of active users. On ideamart, PENDING CHARGE status doesn't count as an active user. So actual subscriber base may be higher than this value)



//Get subscription base size
$baseSize = $sub->getBaseSize($AppId,$Password);




Are you need to check the status of your subscriber?


Use following code. status can be one of following

REGISTERED
UNREGISTERED
PENDING CHARGE
TEMPORARY_BLOCKED
BLOCKED




// Get user registration status
$status = $sub->getStatus($AppId,$Password,$SubscriberId);  




Subscription Notifications


When user registering or unregistering from your app, ideamart send a notification to your app. You need to give the URL of this script to "Subscription notification URL" in subscription API configurations.



<?php

include_once 'log.php';

$array =  json_decode(file_get_contents('php://input'), true);

$applicationId =$array['applicationId'];
$frequency= $array['frequency'];
$status= $array['status'];
$address= $array['subscriberId'];
$version= $array['version'];
$timeStamp= $array['timeStamp'];

logFile("");
logFile("***********************************************");
logFile("address    :$address");
logFile("frequency  :$frequency");
logFile("status     :$status");
logFile("timestamp  :$timeStamp");

if($status=="REGISTERED") {
    // Do something

}else if($status=="UNREGISTERED") {
    // Do something
}

?>






Idea Pro ඇප් නිර්මාණය - මූලික පියවර





ideamart platform තුළ idea Pro ඇප්ලිකේෂනයක් නිර්මාණය කිරීමේ අදියර 5 කි.

1. Provisoning the application
2. Pending Approval
3. Limited Production
4. Pending Approval for active production
5. Active Production


Provisoning the application





Link : How to provision your app


App එක ideamart තුළ ලියාපදිංචි කිරීම මෙම අදියරේදී සිදුකෙරේ. සියළුම settings සිදුකළ පසු, Apply for Approval යන්න ක්ලික් කර, අනුමැතිය සදහා ඉදිරිපත් කළ යුතුය. අනුමැතියට ඉදිරිපත් කළ සැනින් ඔබට App එක සදහා අදාළ password එක ඊ-මේල් පණිවිඩයක් මගින් ලැබෙනු ඇත.




Pending Approval

මෙහිදී ideamart මගින් ඔබගේ App එක පිළිබද පරීක්ෂා කර බලනු ලබයි. එහිදී මූලික වශයෙන් එය ideamart නිති රිති වලට එකඟවේද යන්න සලකා බලයි. සියල්ල නිවැරදි නම් App එක Limited Production තත්වයට මාරු කරනු ලබයි. මෙහිදී ඔබව ඊ-මේල් පණිවිඩයක් මගින් දැනුවත් කරනු ඇත.














Limited Production

දැන් ඔබට ඔබගේ App එක සජීවීව පරීක්ෂාකර බැලීමට අවස්ථාවක් හිමිවේ. මෙම අවස්ථාවේදී ඔබගේ යෙදුම භාවිත කළ හැක්කේ, Provisioning වලදී Whitelisted Numbers සදහා ලබාදුන් දුරකථන අංක මගින් පමණි.

සියළු පරීක්ෂාකිරීම් අවසන් කළ පසු ඔබට, Apply for Active Production තේරීම මගින්, APP එක අවසන් අදියර වෙත යොමුකළ හැක.









Active Production

ඔබගේ APP එක, ideamart වෙතින් අවසන් අධීක්ෂණයට ලක්කර, Active production අවස්ථාවට මාරුකරනු ඇත. මෙහිදී ඔබව ඊ-මේල් පණිවිඩයක් මගින් ද දැනුවත් කරනු ඇත.





දැන් ඔබට ඔබේ App එක පිළිබඳ සේවාලාභින් දැනුවත් කළ හැක. ඒ සදහා භාවිතා කරන සියළුව ප්‍රචාරණ අයිතම (Marketing materials) ideamart වෙත ඉදිරිපත් කර අනුමත කරගත යුතු ය.

ideamart වෙතින් අනුමැතිය  ලබාගැනීමට, එම අයිතම පහත ඊ-මේල් ලිපින අතරින් එකකට යොමු කළ හැක.

info@ideamart.lk
Kasun.Withanaarachi@dialog.lk




Related links