Changes in PIOConfig
Method PIOConfig.setHelpUrl(String) has been removed.
To set the URL for Help screen, add the following string to your strings.xml:
<string name="help_text">https://www.your_url.com</string>Other changes
Since v3.3.15, Help, Quality Guarantee and About screens can either show native content
(Subtitle and text) or HTML page.
To show native content, add the following strings to your strings.xml:
<string name="help_subtitle">Subtitle goes here</string>
<string name="help_text">Text goes here...</string>
<string name="quality_guarantee_subtitle">Subtitle goes here</string>
<string name="quality_guarantee_text">Text goes here...</string>
<string name="about_subtitle">Subtitle goes here</string>
<string name="about_text">Text goes here...</string>To show HTML page, add corresponding strings with URLs to your strings.xml:
<string name="help_text">https://www.your_url.com</string>
<string name="quality_guarantee_text">https://www.your_url.com</string>
<string name="about_text">https://www.your_url.com</string>Changes in Custom Analytics Tracking
Custom Analytics Tracking was introduced in Gooten SDK v3.2.8 (More info here)
If you did not implement Custom Analytics Tracking, you don't need to take any steps.
If you implemented Custom Analytics Tracking, you need to make the following changes:
Method trackItem(Context context, Event event) has been added to the AnalyticsTracker interface.
It is used in conjuction with trackTransaction() in order to track individual Items within a Transaction.
Every Item in a Transaction needs to have a transactionID which specifies which Transaction the Item belongs to.
//import print.io.analytics.ItemEvent;
public void trackItem(Context context, ItemEvent event)Changes in PIOConfig
Method PIOConfig.setScreenVersion(ScreenVersion) has been removed.
Since v3.3.9, Products and Product Details Screens' versions can be set independently, using the following methods:
PIOConfig.setProductsScreenVersion(ScreenVersion screenVersion); // Default value is ScreenVersion.V_1
PIOConfig.setProductDetailsScreenVersion(ScreenVersion screenVersion); // Default value is ScreenVersion.V_1To keep the current behaviour, invoke both methods and pass the same ScreenVersion as arguments.
Changes in PIOConfig
Method PIOConfig.setRecipeID(String, String) has changed signature to PIOConfig.setRecipeID(String) and now only accepts recipe ID for current environment.
Method PIOConfig.setLiveApplication(boolean) was removed. In order to change environment you can use PIOConfig.setEnvironment(Environment) method. Default is Environment.LIVE.
Changes in Custom Analytics Tracking
Custom Analytics Tracking was introduced in Gooten SDK v3.2.8 (More info here)
If you did not implement Custom Analytics Tracking, you don't need to take any steps.
If you implemented Custom Analytics Tracking, you need to make the following changes:
Method trackEvent(Context context, Event event) has been replaced with separate methods for each event type.
There are three event types: ScreenViewEvent, ActionEvent and TransactionEvent, hence the following three methods:
//import print.io.analytics.ActionEvent;
//import print.io.analytics.BaseEvent;
//import print.io.analytics.ScreenViewEvent;
//import print.io.analytics.TransactionEvent;
public void trackAction(Context context, ActionEvent event)
public void trackScreen(Context context, ScreenViewEvent event)
public void trackTransaction(Context context, TransactionEvent event)Each event type now has its unique properties instead of having a generic dictionary.
Changes in PIOConfig
Method setGoogleAnalyticsTrackId() has been removed. In order to use Google Analytics you should do following:
// import print.io.analytics.impl.GoogleAnalyticsTracker;
config.setAnalyticsTracker(new GoogleAnalyticsTracker(trackingId));Changes in AndroidManifest.xml
The following activity declaration:
<activity android:name="print.io.ActivityPaymentMethod" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize" />should be replaced by:
<activity android:name="print.io.ActivityPaymentMethod" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize|stateUnchanged" />Following activity declaration should be added:
<activity android:name="print.io.ActivityQualityGuarantee" android:screenOrientation="portrait" />Changes in PIOConfig
Method setApiUrl has been removed. It is not required to set API URL anymore.
Method setRecipeID(String recipeID) has been changed to setRecipeIDs(String liveRecipeID, String stagingRecipeID). From now on you would need to specify both live and staging recipe IDs (respectively) when setting recipe IDs.
Changes after Side Menu got redesigned
Side Menu got brand new design in v3.2.0.
It is advised that all custom configurations related to Side Menu get checked because they could be obsolete now.
Please refer to Side Menu section inside SDK Reference for new configuration possibilities.
Major changes related to the Side Menu:
-
Methods for setting available options in side menu have been changed
- Methods
PIOConfig.setSideMenuInfoButtons()andPIOConfig.setSideMenuButtonsTop()have been removed,
and new method for controlling visibility of buttons inside Side MenuPIOConfig.setVisibleSideMenuButtons()has been added.
- Methods
-
Side Menu color scheme has been changed
- Following colors have become obsolete:
side_menu_options_subtitle_text
side_menu_options
side_menu_accounts_subtitle_text
side_menu_accounts
side_menu_info_subtitle_text
side_menu_info
side_menu_version_bg
BugSense library dependency
BugSense library has been removed from the SDK, but feature is still supported via the same method PIOConfig.setBugSenseKey(String).
If you wish to use this feature in SDK v3.2.0 or later, you have to add BugSense library v3.5 to your project.
Parse library
Parse library has been removed and so was the support for push notifications.
It is up to the host application to implement push notifications.
Facebook SDK Facebook photo source now uses Facebook SDK v4.5.0.
Method PIOConfig.setShowFeaturedProductsByDefault was removed and all products are shown by default.
Enum value SideMenuButton.FEATURED_PRODUCTS was removed.
Changes in AndroidManifest.xml
Activity declarations have been modified and new Activities were added.
Please refer to Project Setup
New feature - Text
A new feature has been added in this version, which allows users to add text to products.
In order for this feature to work, fonts folder needs to be added to the assets folder of the host app.
The folder can be found in our Example app
Changes in AndroidManifest.xml
Following activity declarations should be added:
<activity android:name="print.io.ActivityProductOptions" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivitySelectPhotos" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityCustomizeList" android:screenOrientation="portrait" android:windowSoftInputMode="stateHidden" />
<activity android:name="print.io.ActivityOptionBackground" android:screenOrientation="portrait" android:windowSoftInputMode="stateHidden" />The following activity declarations should be removed:
<activity android:name="print.io.ActivityProductPreview" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityCustomSteps" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityImageUpload" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityStickerBook" android:screenOrientation="portrait" android:windowSoftInputMode="stateHidden" />
<activity android:name="print.io.ActivityCaseColorStyle" android:screenOrientation="portrait" android:windowSoftInputMode="stateHidden" />The following activity declaration:
<activity android:name="print.io.ActivityCustomizeProduct" android:screenOrientation="portrait" />should be replaced by:
<activity android:name="print.io.ActivityCustomizeProduct" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize" />The following activity declaration:
<activity android:name="print.io.ActivityCustomizePhotobook" android:screenOrientation="landscape" />should be replaced by:
<activity android:name="print.io.ActivityCustomizePhotobook" android:screenOrientation="landscape" android:windowSoftInputMode="adjustResize" />Changes in PIOConfig class
Medhod PIOConfig.hideEditButtonInShoppingCart() has been removed as well as the Edit button in the Shopping Cart.
Changes in PIOConfig class
Mechanism for showing vendor logo on screens has been changed. New method for showing logo on screens PIOConfig.setVendorLogoOnScreen has been added and previously defined method for removing logo from Payment and Order Completed screens PIOConfig.removeLogoFromPaymentScreen has been removed.
If you used removeLogoFromPaymentScreen(true) to remove logo from Payment screen in your SDK initialization code, then you should simply remove this method call, as logos are now hidden from all screens by default.
Otherwise, if your SDK was showing overridden logos, you should add the following code to your SDK initialization code:
PIOConfig.setVendorLogoOnScreen(Screen.PAYMENT, R.drawable.icon_logo_payment_screen);
PIOConfig.setVendorLogoOnScreen(Screen.ORDER_COMPLETED, R.drawable.icon_logo);Changes in AndroidManifest.xml
Following activity declarations should be added:
<activity android:name="print.io.ActivityProducts" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize"/>
<activity android:name="print.io.ActivityProductsV2" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize" />
<activity android:name="print.io.ActivityProductDetailsV2" android:screenOrientation="portrait" />The following activity declaration should be removed:
<activity android:name="print.io.ActivityFeaturedProducts" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize"/>Changes in Screen enum
Value FEATURED_PRODUCTS has been renamed PRODUCTS.
Changes in PIOConfig class
- Disabling screens
Mechanism for disabling screens has been changed.
Since version v3.0.13, the correct way to disable screens is to pass a List<Screen> to the setDisabledScreens() method.
For example, instead of using:
PIOConfig#setSkipProductDetails(true);
// ... or PIOConfig#setPhotoSourcesDisabled(true)you should now use:
//import print.io.piopublic.Screen;
PIOConfig#setDisabledScreens(Arrays.asList(Screen.PRODUCT_DETAILS)));
// ... or PIOConfig#setDisabledScreens(Arrays.asList(Screen.PRODUCT_DETAILS, Screen.SELECT_PHOTOS)));Note: Up until v3.0.13, disabling Product Options screen was done by passing SKU to the SDK.
In order to be consistent, this way of disabling Product Options has been changed.
As of v3.0.13, disabling Product Options is done the same way as for other screens.
If Product Options screen is disabled, passed SKU will still be used to specify product variant or, if SKU was not passed, default SKU will be used.
- Jump to screen
Mechanism for jumping to screens has been changed.
Since version v3.0.13, concept of screen flags has been removed, as well as setJumpToScreenFlags(int) and setJumpToScreen(Screen, int) methods.
Instead of screen flags, a new method setJumpToScreen(Screen, Screen) for specifying "navigate-back screen" has been added.
For example, if you want to launch the SDK at Shopping Cart screen, and go to Products screen when user navigates back, you would have to do the following:
PIOConfig#setJumpToScreen(Screen.SHOPPING_CART, Screen.PRODUCTS);Changes in PIOConfig class
Method setCountryOnFeaturedProducts has been removed and new method showCountrySelectionOnScreen for showing country selection bar on arbitrarily screens has been added.
For example, instead of using
PIOConfig#setCountryOnFeaturedProducts(true);you should use
PIOConfig#showCountrySelectionOnScreen(Arrays.asList(Screen.FEATURED_PRODUCTS));Changes in AndroidManifest.xml
Following activity declarations should be added:
<activity android:name="print.io.ActivityCustomizePhotobook" android:screenOrientation="landscape" />
<activity android:name="print.io.ActivityProductPreview" android:screenOrientation="portrait" />Following activities are no longer used and should be removed:
<activity android:name="print.io.ActivityAnimatedHelp" android:screenOrientation="portrait" />API Changes
Screen titles are now displayed using a separate font.
Use the new method PIOConfig#setFontPathInAssetsTitle(String) to set Title font.
To keep using the same fonts, use the same font for setFontPathInAssetsNormal() and setFontPathInAssetsTitle().
Method PIOConfig#setSplashScreenEnabled(boolean isSplashScreenEnabled) has been removed.
Use PIOConfig#setSplashScreenTimeout(int splashScreenTimeout) to enable or disable Splash Screen.
Separate colors for Save To Cart button have been added.
To keep the design the same, set Save To Cart button colors to be the same as your secondary button colors.
A separate text size for Create It button has been added (text_size_button_create_it).
To keep the design the same, set Create It text size to be the same as the text_size_normal in your dimens.xml.
Notice that there are two versions of dimens.xml file - values/dimens.xml for small screens and values-sw330dp/dimens.xml for normal screens.
Renamed Resources
Resource icon_arrow_back_2.png has been renamed icon_arrow_back.png
Set icon for back button
Resources which define primary and secondary buttons' colors have been renamed.
res/colors.xml
<color name="green"> --> <color name="button_primary_default">
<color name="green_dark"> --> <color name="button_primary_pressed">
<color name="blue_light"> --> <color name="button_secondary_default">
<color name="blue_dark"> --> <color name="button_secondary_pressed">Changes in AndroidManifest.xml
Update minSdkVersion and targetSdkVersion fields to following values:
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />Following activity declaration should be added:
<activity android:name="print.io.ActivityCustomSteps" android:screenOrientation="portrait" />Following activities are no longer used and should be removed:
<activity android:name="print.io.ActivityStickerbooksType" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityPhoneCaseGrid" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityThickPrintGrid" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityCanvasWrapsGrid" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityCanvasWrapsNext" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityChooseGridLayout" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityThrowPillowGrid" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityStepsListView" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityShoppingMethods" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityShippingAddress" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityAcrylicBlocksGrid" android:screenOrientation="portrait" android:windowSoftInputMode="stateHidden" />
<activity android:name="print.io.ActivityChooseGridLayoutTwoScollViews" android:screenOrientation="portrait" />
<activity android:name="print.io.ActivityPreviewOnWall" android:screenOrientation="portrait" />Changes in PIOConfig class
-
Method
PIOConfig#setStepByStep()has been removed. -
Method
PIOConfig#setJumpToScreen()now acceptsprint.io.piopublic.Screenenum instead of int values fromPublicConstants.ScreenIds.
For example, instead of using
PIOConfig#setJumpToScreen(PublicConstants.ScreenIds.SCREEN_SHOPPING_CART, 0);you should use
//import print.io.piopublic.Screen;
PIOConfig#setJumpToScreen(Screen.SHOPPING_CART, 0);- Method
PIOConfig#setPaymentOptions()now accepts aListof<print.io.piopublic.PaymentOptionType>instead of packed ints fromPublicConstants.PaymentOptions.
For example, instead of using
PIOConfig#setPaymentOptions(PublicConstants.PaymentOptions.PAYMENT_OPTION_ALL);you should use
//import print.io.piopublic.PaymentOptionType;
List<PaymentOptionType> paymentOptions = new ArrayList<PaymentOptionType>(2);
paymentOptions.add(PaymentOptionType.PAY_PAL);
paymentOptions.add(PaymentOptionType.CREDIT_CARD);
PIOConfig#setPaymentOptions(paymentOptions);Changes with photo sources
In order to support custom photo sources (defined by SDK users) new mechanism for photo sources has been introduced.
As of v2.1.8 use of PhotoSource enum values have been replaced with corresponding classes implementing new PhotoSource interface. These classes are :
print.io.photosource.impl.dropbox.DropboxPhotoSource
print.io.photosource.impl.facebook.FacebookPhotoSource
print.io.photosource.impl.flickr.FlickrPhotoSource
print.io.photosource.impl.instagram.InstagramPhotoSource
print.io.photosource.impl.phone.PhonePhotoSource
print.io.photosource.impl.photobucket.PhotobucketPhotoSource
print.io.photosource.impl.picasa.PicasaPhotoSource
print.io.photosource.impl.preselected.PreselectedPhotoSourceFor example, previous code for defining list contaning Facebook and Phone photo sources would look like:
List<PhotoSource> photoSources = Arrays.asList(PhotoSource.FACEBOOK, PhotoSource.Phone);Now in order to create photo source simply create object by calling default constructor of photo source implementation class. Which would look like:
List<PhotoSource> photoSources = Arrays.asList(new FacebookPhotoSource(), new PhonePhotoSource());Changes in PIOConfig class
-
Method
PIOConfig#setPhotoSources()now accepts list of objects implementingPhotoSourceinterface instead of enum values as it was previously the case. -
Photo source configuration has been moved to corresponding photo source classes.
For example, instead of using
PIOConfig#setInstagramClientId(String);
PIOConfig#setInstagramCallbackUri(String);you should use corresponding methods in InstagramPhotoSource class.
InstagramPhotoSource#setClientId(String);
InstagramPhotoSource#setCallbackUri(String);Changes in AndroidManifest.xml
Following activity declarations:
<activity android:name="print.io.social.Instagram" android:noHistory="true" android:screenOrientation="portrait" />
<activity android:name="print.io.social.Flickr" android:noHistory="true" android:screenOrientation="portrait" />
<activity android:name="print.io.social.Dropbox" android:noHistory="true" android:screenOrientation="portrait" />should been changed to:
<activity android:name="print.io.photosource.impl.instagram.Instagram" android:noHistory="true" android:screenOrientation="portrait" />
<activity android:name="print.io.photosource.impl.flickr.Flickr" android:noHistory="true" android:screenOrientation="portrait" />
<activity android:name="print.io.photosource.impl.dropbox.Dropbox" android:noHistory="true" android:screenOrientation="portrait" />The ProductType enum
ProductType enum has been introduced to substitute the use of actual values of Product IDs previously found in PublicConstatns.ProductIds class.
As of v2.1.8, instead of using fields from PublicConstatns.ProductIds class you should use corresponding values from print.io.piopublic.ProductType enum.
Changes in PIOConfig class
Method setProductIdFromApp() has been renamed to setProductFromApp(), and now accepts ProductType instead of int for specifying product.
All enum definitions from PIOConfig class were moved to a separate package called print.io.piopublic.
Because of this, you will have to change the following imports:
import print.io.PIOConfig.PhotoSource;
import print.io.PIOConfig.SideMenuButton;
import print.io.PIOConfig.SideMenuInfoButton;
to:
import print.io.piopublic.PhotoSource;
import print.io.piopublic.SideMenuButton;
import print.io.piopublic.SideMenuInfoButton;
- Create an instance of
PIOConfig:
private PIOConfig config = new PIOConfig();
- Instead of invoking static methods from
PIOclass, invoke methods onPIOConfiginstance: for example:
PIO.setLiveApplication(false);
becomes:
config.setLiveApplication(false);
- Change following imports:
import print.io.PIO.PhotoSource;
import print.io.PIO.SideMenuButton;
import print.io.PIO.SideMenuInfoButton;
to:
import print.io.PIOConfig.PhotoSource;
import print.io.PIOConfig.SideMenuButton;
import print.io.PIOConfig.SideMenuInfoButton;
- Use API_URL constants from print.io.PublicConstants class:
config.setApiUrl(PublicConstants.API_URL_STAGING);
or
config.setApiUrl(PublicConstants.API_URL_LIVE);
- In your application class, replace the following method calls:
PIO.setParseApplicationId(PIOConstants.Parse.APPLICATION_ID);
PIO.setParseClientKey(PIOConstants.Parse.CLIENT_KEY);
PIO.initializeParse(this);
with:
PIO.initializeParse(this, PIOConstants.Parse.APPLICATION_ID, PIOConstants.PayPal.CLIENT_ID);`
- If your app is using Instagram Photosource, you need to specify Instagram Callback URI:
public static final String CALLBACK_URI = "http://x-oauthflow-instagram";
config.setInstagramCallbackUri(PIOConstants.Instagram.CALLBACK_URI);
- Use the following code to start the PIO SDK:
try {
PIO.setConfig(this, config);
PIO.start(this);
} catch (PIOException e) {
e.printStackTrace();
}
-
PIOConfig.setInstagramCallbackUri(String)method is now required for Instagram photosource. -
PIO.setPayPalReceiverEmail(String)method has been removed. Receiver e-mail is not necessary anymore. -
PIO.setParseApplicationId(String),PIO.setParseClientKey(String)andPIO.initializeParse(Application)methods have been replaced by a single methodPIO.initializeParse(Application, String, String).
- Import printio-android-sdk library project into your application project
- Create Application class and add it to the Manifest
- Add PIO Config initialization code to you Application class' onCreate() method
- Let your main activity extend print.io.ActivitySplash
- Add required print.io activity declarations to your Manifest (refer to README file)