Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #156 from shalehaha/sample1
Browse files Browse the repository at this point in the history
More updates for sample apps
  • Loading branch information
sbenedicadb committed May 25, 2016
2 parents 741b47b + c9740e4 commit f3a9c82
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
<!--</intent-filter>-->
<!--</activity>-->

<receiver android:name="com.adobe.mobile.ReferralReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

<receiver android:name="com.adobe.mobile.MessageNotificationHandler" />

<receiver
Expand Down
69 changes: 38 additions & 31 deletions samples/Android/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
**ADBMobileSamples Android**
======================
== ADBMobileSamples ==
======================

This application is being provided by Adobe to demonstrate functionality of the new Android 4.0 Tracking SDK.
This application is being provided by Adobe to demonstrate functionality of the Android 4.x Tracking SDK.

The following examples can be found within the app:
* Simple analytics tracking, including using context data
* Using Privacy settings, including user opt-in, opt-out, and unknown
* Timed Actions
* Targeting based on points of interest using trackLocation
* Targeting based on lifecycle metrics and testing special offers
* Media tracking, including segmenting by offsets and milestones
* Tracking customer lifetime value increases

The application supports Android version 2.2 and newer.


For full 4.0 SDK documentation, please visit:
http://microsite.omniture.com/t2/help/en_US/mobile/android/


**Recent Changes**

_(Feb 04, 2014)_

* Updated Adobe Mobile Library to latest version (4.0.2)

_1.1 (Nov 14, 2013)_

* Added Lifetime Value samples

_1.0 (Sept 26, 2013)_

* Initial release of sample app

- Simple analytics tracking, including using context data
- Using Privacy settings, including user opt-in, opt-out, and unknown
- Timed Actions
- Targeting based on points of interest using trackLocation
- Targeting based on lifecycle metrics and testing special offers
- Media tracking, including segmenting by offsets and milestones
- Lifetime Value tracking
- In-App Messaging and tracking of In-App Messaging
- Deep linking
- Postbacks

For full 4.x SDK documentation, please visit:
https://marketing.adobe.com/resources/help/en_US/mobile/android/

================
== Change Log ==
================
1.4 (May 25, 2016)
- App updated with SDK 4.10.0
- Use Gradle as build tool
- Added Push Messaging, Acquisition, Postbacks, Deep linking and some Messaging updates

1.3 (Apr 16, 2015)
- App updated to use SDK version 4.4.2
- Added In-App messaging samples

1.2 (Oct 16, 2014)
- Added 4.2 version of SDK

1.1 (Nov 14, 2013)
- Added Lifetime Value samples

1.0 (Sept 26, 2013)
- Initial release of sample app
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4</string>
<string>1.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
95 changes: 71 additions & 24 deletions samples/iOS/ADBMobileSamples/AdobeMobile/ADBMobile.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Copyright 1996-2016. Adobe, Inc. All Rights Reserved
//
// SDK Version: 4.9.0
// SDK Version: 4.10.0

#import <Foundation/Foundation.h>
@class CLLocation, CLBeacon, TVApplicationController, ADBTargetLocationRequest, ADBMediaSettings, ADBMediaState;
Expand All @@ -29,9 +29,9 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) {
* @see visitorSyncIdentifiers
*/
typedef NS_ENUM(NSUInteger, ADBMobileVisitorAuthenticationState) {
ADBMobileVisitorAuthenticationStateUnknown = 0, /*!< Enum value ADBMobileVisitorAuthenticationStateUnknown. */
ADBMobileVisitorAuthenticationStateAuthenticated = 1, /*!< Enum value ADBMobileVisitorAuthenticationStateAuthenticated. */
ADBMobileVisitorAuthenticationStateLoggedOut = 2 /*!< Enum value ADBMobileVisitorAuthenticationStateLoggedOut. */
ADBMobileVisitorAuthenticationStateUnknown = 0, /*!< Enum value ADBMobileVisitorAuthenticationStateUnknown. */
ADBMobileVisitorAuthenticationStateAuthenticated = 1, /*!< Enum value ADBMobileVisitorAuthenticationStateAuthenticated. */
ADBMobileVisitorAuthenticationStateLoggedOut = 2 /*!< Enum value ADBMobileVisitorAuthenticationStateLoggedOut. */
};

/**
Expand All @@ -46,6 +46,18 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
ADBMobileDataEventDeepLink
};

/** @defgroup ADBConfigParameters
* These constant strings can be used as the keys for common parameters within Configuration
* Example: NSURL *url = callbackData[ADBConfigKeyCallbackDeepLink];
*/

/*
* Used within ADBMobileDataCallback
* Key for deep link URL.
*/
FOUNDATION_EXPORT NSString *const __nonnull ADBConfigKeyCallbackDeepLink;


/**
* @class ADBMobile
* This class is used for all interaction with the Adobe Mobile Services.
Expand Down Expand Up @@ -283,7 +295,7 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
* @note This method will send a tracking hit if the parameter logic is nil or returns YES.
*/
+ (void) trackTimedActionEnd:(nullable NSString *)action
logic:(nullable BOOL (^)(NSTimeInterval inAppDuration, NSTimeInterval totalDuration, NSMutableDictionary* __nullable data))block;
logic:(nullable BOOL (^)(NSTimeInterval inAppDuration, NSTimeInterval totalDuration, NSMutableDictionary* __nullable data))block;

/**
* @brief Returns whether or not a timed action is in progress
Expand Down Expand Up @@ -333,9 +345,9 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
* @return An ADBMediaSettings pointer.
*/
+ (nonnull ADBMediaSettings *) mediaCreateSettingsWithName:(nullable NSString *)name
length:(double)length
playerName:(nullable NSString *)playerName
playerID:(nullable NSString *)playerID;
length:(double)length
playerName:(nullable NSString *)playerName
playerID:(nullable NSString *)playerID;

/**
* @brief Creates an ADBMediaSettings populated with the parameters.
Expand All @@ -348,20 +360,20 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
* @return An ADBMediaSettings pointer.
*/
+ (nonnull ADBMediaSettings *) mediaAdCreateSettingsWithName:(nullable NSString *)name
length:(double)length
playerName:(nullable NSString *)playerName
parentName:(nullable NSString *)parentName
parentPod:(nullable NSString *)parentPod
parentPodPosition:(double)parentPodPosition
CPM:(nullable NSString *)CPM;
length:(double)length
playerName:(nullable NSString *)playerName
parentName:(nullable NSString *)parentName
parentPod:(nullable NSString *)parentPod
parentPodPosition:(double)parentPodPosition
CPM:(nullable NSString *)CPM;

/**
* @brief Opens a media item for tracking.
* @param settings a pointer to the configured ADBMediaSettings
* @param callback a block pointer to call with an ADBMediaState pointer every second.
*/
+ (void) mediaOpenWithSettings:(nullable ADBMediaSettings *)settings
callback:(nullable void (^)(ADBMediaState* __nullable mediaState))callback;
callback:(nullable void (^)(ADBMediaState* __nullable mediaState))callback;

/**
* @brief Closes a media item.
Expand Down Expand Up @@ -414,6 +426,22 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
*/
+ (void) targetLoadRequest:(nullable ADBTargetLocationRequest *)request callback:(nullable void (^)(NSString* __nullable content))callback;

/**
* @brief Processes a Target service request.
* @param name a string pointer containing the name of the mbox
* @param defaultContent a string pointer containing the content to be returned on failure
* @param profileParameters a dictionary of parameters to be added to the profile
* @param orderParameters a dictionary
* @param mboxParameters a dictionary of parameters for the mbox
* @param callback a block pointer to call with a response string pointer parameter upon completion of the service request.
*/
+ (void) targetLoadRequestWithName:(nullable NSString *)name
defaultContent:(nullable NSString *)defaultContent
profileParameters:(nullable NSDictionary *)profileParameters
orderParameters:(nullable NSDictionary *)orderParameters
mboxParameters:(nullable NSDictionary *)mboxParameters
callback:(nullable void (^)(NSString* __nullable content))callback;

/**
* @brief Creates a ADBTargetLocationRequest populated with the parameters.
* @param name a string pointer.
Expand All @@ -423,8 +451,8 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
* @see targetLoadRequest:callback: for processing the returned ADBTargetLocationRequest pointer.
*/
+ (nullable ADBTargetLocationRequest *) targetCreateRequestWithName:(nullable NSString *)name
defaultContent:(nullable NSString *)defaultContent
parameters:(nullable NSDictionary *)parameters;
defaultContent:(nullable NSString *)defaultContent
parameters:(nullable NSDictionary *)parameters;

/**
* @brief Creates a ADBTargetLocationRequest populated with the parameters.
Expand All @@ -437,13 +465,25 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
* @see targetLoadRequest:callback: for processing the returned ADBTargetLocationRequest pointer.
*/
+ (nullable ADBTargetLocationRequest *) targetCreateOrderConfirmRequestWithName:(nullable NSString *)name
orderId:(nullable NSString *)orderId
orderTotal:(nullable NSString *)orderTotal
productPurchasedId:(nullable NSString *)productPurchasedId
parameters:(nullable NSDictionary *)parameters;
orderId:(nullable NSString *)orderId
orderTotal:(nullable NSString *)orderTotal
productPurchasedId:(nullable NSString *)productPurchasedId
parameters:(nullable NSDictionary *)parameters;

/**
* @brief Clears target cookies from shared cookie storage
* @brief Gets the custom visitor ID for target
* @return thirdPartyId a string pointer containing the value of the third party id (custom visitor id)
*/
+ (nullable NSString *) targetThirdPartyID;

/**
* @brief Sets the custom visitor ID for target
* @param thirdPartyId a string pointer containing the value of the third party id (custom visitor id)
*/
+ (void) targetSetThirdPartyID:(nullable NSString *)thirdPartyID;

/**
* @brief Resets the user's experience
*/
+ (void) targetClearCookies;

Expand All @@ -457,7 +497,7 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
* @brief Gets the value of the SessionID cookie returned for this visitor by the Target server
* @return An NSString pointer containing the SessionID for this user
*/
+ (nullable NSString *) targetSessionID;
+ (nonnull NSString *) targetSessionID;

#pragma mark - Audience Manager

Expand Down Expand Up @@ -533,14 +573,21 @@ typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) {
*/
+ (nullable NSArray *) visitorGetIDs;

#pragma mark - PII collection

/**
* @brief Submits a PII collection request
* @param dictionary pointer containing PII data
*/
+ (void) collectPII:(nullable NSDictionary<NSString *, NSString *> *)data;

@end

#pragma mark - ADBVisitorID
@interface ADBVisitorID : NSObject
- (nullable NSString *)idType;
- (nullable NSString *)identifier;
- (ADBMobileVisitorAuthenticationState) authenticationState;

@end

#pragma mark - ADBTargetLocationRequest
Expand Down
Binary file modified samples/iOS/ADBMobileSamples/AdobeMobile/AdobeMobileLibrary.a
Binary file not shown.
65 changes: 36 additions & 29 deletions samples/iOS/README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
**ADBMobileSamples iOS**
======================
== ADBMobileSamples ==
======================

This application is being provided by Adobe to demonstrate functionality of the new iOS 4.x Tracking SDK.
This application is being provided by Adobe to demonstrate functionality of the iOS 4.x Tracking SDK.

The following examples can be found within the app:
* Simple analytics tracking, including using context data
* Using Privacy settings, including user opt-in, opt-out, and unknown
* Timed Actions
* Targeting based on points of interest using trackLocation
* Targeting based on lifecycle metrics and testing special offers
* Media tracking, including segmenting by offsets and milestones
* Lifetime Value tracking
- Simple analytics tracking, including using context data
- Using Privacy settings, including user opt-in, opt-out, and unknown
- Timed Actions
- Targeting based on points of interest using trackLocation
- Targeting based on lifecycle metrics and testing special offers
- Media tracking, including segmenting by offsets and milestones
- Lifetime Value tracking
- In-App Messaging and tracking of In-App Messaging
- Deep linking
- Postbacks

The application supports iOS version 6.1 and newer.

There are three schemes set up in the XCode Project:
* ADBMobileSamples will send data to a demo report suite controlled by Adobe
* ADBMobileSamples - Dev will send data to a dev report suite controlled by Adobe
* ADBMobileSamples - Bloodhound is configured to send all hits to localhost:50000 so you can easily see your data in Bloodhound
For full 4.x SDK documentation, please visit:
https://marketing.adobe.com/resources/help/en_US/mobile/ios/

For full 4.0 SDK documentation, please visit:
http://microsite.omniture.com/t2/help/en_US/mobile/ios/
================
== Change Log ==
================

1.5 (May 25, 2016)
- App updated with SDK 4.10.0
- Added Deep linking and some Messaging updates

**Recent Changes**
1.4 (Aug --, 2015)
- App updated with SDK 4.6.0
- Added Push Messaging, Acquisition, and Postbacks

_1.2 (Oct 16, 2014)_
1.3 (Apr 16, 2015)
- App updated to use SDK version 4.4.1
- Added In-App messaging samples
- Uses a preprocessor directive instead of schemes to switch between different config files

* Updated Adobe Mobile Library to latest version (4.2.0)
* iOS 8 compatability
1.2 (Oct 16, 2014)
- Added 4.2 version of SDK
- Fixed a couple bugs introduced with iOS 8

_(Feb 04, 2014)_
1.1 (Nov 14, 2013)
- Added Lifetime Value samples

* Updated Adobe Mobile Library to latest version (4.0.1)

_1.1 (Nov 14, 2013)_

* Added Lifetime Value samples

_1.0 (Sept 26, 2013)_

* Initial release of sample app
1.0 (Sept 26, 2013)
- Initial release of sample app

0 comments on commit f3a9c82

Please sign in to comment.