Fix NullPointerException
(https://github.com/tjek/tjek-android-sdk/issues/41)
Re-throw CancellationException
(#40)
This release is not backwards-compatible with the previous one.
This release sees a major restructuring of the entire SDK. Some external libraries developed by Tjek (like Verso
and ZoomLayout
are been moved inside the SDK code (the separated GH projects won't be mantained anymore).
It also include the brand new publicationviewer.incito
package to allow you to show Incito publication as well. The demo app included in the SDK has been updated to showcase the main use cases and it's a good starting point for your migration as well.
-
Change the manifest metadata
- from
name="com.shopgun.android.sdk.api_key"
toname="com.tjek.sdk.api_key"
- from
name="com.shopgun.android.sdk.develop.api_key"
toname="com.tjek.sdk.develop.api_key"
- from
name="com.shopgun.android.sdk.eventskit.application_track_id"
toname="com.tjek.sdk.application_track_id"
- from
name="com.shopgun.android.sdk.develop.eventskit.application_track_id"
toname="com.tjek.sdk.develop.application_track_id"
- remove metadata related to the
api_secret
. It's not needed anymore.
- from
-
The root namespace has been changed from
com.shopgun.android.sdk
tocom.tjek.sdk
. Imports directives change accordingly, but also the internal packages changed: everything related to publications is undercom.tjek.sdk.publicationviewer.[incito|paged]
, so instead ofimport com.shopgun.android.sdk.pagedpublicationkit.PagedPublicationFragment
you now haveimport com.tjek.sdk.publicationviewer.paged.PagedPublicationFragment
-
Many models changed name, like
Catalog
is nowPublicationV2
and is used for both incito and pdfs. If you directly used any other model, check theapi.models
package to see if it's been renamed and moved there. You can also check what is the return type of each api call inTjekAPI.kt
to be sure what to use in each specific case. -
If you were implementing some interfaces for the PDF viewer, like
PagedPublicationFragment.OnHotspotTapListener
orPagedPublicationConfiguration.OnLoadComplete
, take a look atInterfaces.kt
file in thepublicationviewer.paged
package: it contains all interfaces for the pdf viewer. -
There is no need to build a ShopGun instance anymore (
ShopGun.Builder.setInstance()
). The new Tjek SDK will initialize itself automatically. If you need to change some default setting, checkTjekSDK.configure()
to see what is available. -
All the api calls can be found in
TjekAPI.kt
and aresuspend fun
, so you can use Kotlin coroutines to fetch the data you need. -
Tjek SDK doesn't store app's location anymore in anyway. Location info has to be passed in for each api calls that could be use it (is an optional parameter). If you stored your location inside ShopGun sdk, this can be retrieved using
TjekPreferences.getLegacyLocation(Context)
: this will return the last stored location, if any is available, in the data classLegacyLocation
. This also means that the events generated and sent by the SDK won't include location data automatically, but you need to provide it by callingTjekSDK.setEventsLocation(Location)
.
- Moved the project to Jitpack
- Removed jCenter and unused dependencies
- AndroidX
- Requires Java 8
- Add a dependency to android-apollo for GraphQL queries (not actively used by the sdk right now, but it'll be in the future)
- Dependency updates
- Bug fixes
- AndroidX compatible.
- Updated:
eventskit
has been changed to our new anonymous event format.Event
is deprecated, now isAnonymousEvent
- Everything related to shopping list is now deprecated. We'll no longer maintain this feature and all the classes will be removed at some point in the future.
- Bug fixes
- New:
Glide
now replacesPicasso
for loading images - Everything related to shopping list will be deprecated in the next release. We'll no longer maintain this feature and all the classes will be removed at some point in the future.
Fixed maven dependencies issues.
Now you no longer need to have a local copy of Markhor, ZoomLayout and Verso projects; you can have one single dependency to the sdk
adding implementation 'com.shopgun.android:sdk:x.y.z'
to your gradle file.
With this version, the major changes regards showing the catalogs. The classes used before to show the pages are no longer available and you will need to perform a migration to the new classes.
- Removed:
Pageflip
package is no longer available to display catalog pages and has been replaced by the newpagepublicationkit
package.
For example, if you were usingPageflipFragment
, now it will bePagedPublicationFragment.newInstance(new CatalogConfiguration(my_catalog))
. Take a look atPagedPublicationActivity
in the demo app for an example of an Activity that shows catalog pages.
The new kit also supports showing optional hotspots in the UI, highlighting the offers in the page. - New:
eventskit
package to send events about opening catalogs and offers to our endpoint or custom endpoints. Events are dispatched every 120 secs in batch of 100 events at most. Event system usesRealm
instance to store events locally before sending them. - Various bug fix
- New:
RedirectProtocol
to handle redirects when performing http requests. - Removed: Legacy network
DefaultHttpNetwork
, due to problems with redirect, and SSL certificates. - Migrated a bunch utility methods to project Markhor and performed a cleanup in the remaining
- Prepared for Android Marshmallow
- Added functionality to
ShopGun.Builder
- Bugfix in key handling
- Removed file caching on external storage
- New: ModelRequests, each model should ideally have their own request subclass, that'll make life a lot easier for developers
- Callbacks with model objects, rather than JSON, giving type safety
- Parsing performed on a non-ui-thread, giving a smoother user experience
- Easy loading of sidecar objects
- New: Network implementations allowing mocking of some API requests
- Improved JSON to model object mechanisms, allowing some basic error checking.
- Fix: Some minor issues in PageflipFragment have been sorted out
- Removed: The WeakEventBus-class that previously wrapped EventBus have been removed. Better buckle up.
- Various other minor bug fixes
- New: New statistics package, to replace
PageStats
for Pageflip - Updates to the event log system, to better allow posting of the events
- New: A bunch of new request types, that'll allow for easy access to API data, including having dependencies automatically bundled into the request. See demo app for an example.
- New: Added ShopGun Android SDK to jCenter
- Experimental: Tested for Marshmallow (Android 6, SDK v23)
- Experimental: Intro and outro fragments can be added directly into
PageflipFramgnet
, with this comes some minor tweaks to make it all fit. - Fix:
PageStat
has been sending some negative durations. We expect this to be due to NTP adjusting time. So we'll be usingSystemClock.elapsedRealtime()
to hopefully fix this issue.
- Fix: Bug in Json parsing.
This version brings a lot of new features, and improvements. But it has come at a cost, migration of old code will be very close to impossible. We've moved away from Eclipse into Android Studio, and at the same time changed package namespace, and most class names. It was a move we've wanted to perform for a while, and we felt now was the right time. We are sorry for breaking everything.
- New: Moved codebase to Android Studio structure. Using Gradle as build system.
- New: Migrated codebase to new package namespace,
com.shopgun.android.sdk
and refactored all class names to ShopGun name conventions - New: All model objects implements
Parcelable
, and removedSerilazable
- New:
MaterialColor
interface, to create new vibrant colors that match the material deign guidelines. And at the same time, implementations can handle, the unfortunate situation of the API delivering, an invalid color string. - New:
Environment
to control API endpoints - Fix: Various bugs were squished
- New:
EventBus
(by greenrobot) to post messages around the system - Fix: Major speed improvements to
ListManager
and the underlyingSQLite
database. Picasso
for image loading, removedImageLoader
- Experimental: Better configuration options for
PageflipFragment
, seeReaderConfig
- Experimental: New
filler
package. This should solve some of the problems with creating and controlling multiple requests. This is useful in situations where you want to ensure that a ShopGun model, has all properties you need. ACatalog
might needStore
andDealer
to be set, this should easily and safely be accomplished with this. - Deleted the package
com.shopgun.android.sdk.request
it was fast, but not very safe.
- New:
PageflipFragment
, yes no more JavaScript - New:
ImageLoader
to helpPageflipFragment
load images faster - New:
PhotoView
to project (by Chris Banes) - New: Networking performance, with new loader classes
- New: Started writing tests for models, and features in SDK
- This version has a few breaking changes, due to some memory issues that had to be fixed.
- New: Implemented a Logger interface, allowing for better logging
- Change: All logs are now logged to the same log, see
Logger
- Change: Reduced memory footprint
- Fix: Various bug have been squished
- Fix: ERN/id mismatch causing problems in
EtaErnObject
- Fix: Thread synchronization issues
- New: Reimplementation of the request structure. Now we have a whole networking interface stack, and some implementations of these.
- New: JavaDoc on all public exposed methods (not all POJO)
- New: A logging system via
EtaLog
, that will make debugging way easier - New: All POJO objects have been refactored
- Change: Minor refactoring of class names, to make them reflect their (new) purposes
- Change: Refactored Endpoint, Params, Headersand Sort classes into the Utils package(they don't belong as sub-classes in a request)
- fix: Improved performance in
EtaLocation
, with less write to disk - Deleted:
Api
class has been replaced. It was not easily extendable, the method for generics was faulty, and the type of request was not easy to work with. - fix: Major improvements to
SyncManager
, in keeping state between the local data, server data, and the changes performed in between start and end of a sync cycle
- Fix: Implemented more type safety when parsing JSON for primitive types
- New:
Eta
as a singleton, for ease of use - New: Implemented POJO objects, and factory methods for JSON to POJO
- New: Added
Api
as common request type, which requrns POJO instead of JSON. - New: An simple cache solution for API requests via
API
- New: Automatic creation and refreshing of Sessions, with
SessionManager
- New: A
ShoppinglistManager
as an easy to use interface to create, update and delete shoppinglists, and items - New: SQLite database to save local shoppinglist and item state
- New: A
ListSyncManager
, that will synchronize, and merge local state with remote state - New: JavaScript interface for communication between Pageflip and the apps
- Fix: Major speed improvements for Pageflip (see example)
- Deleted: Basically a complete re-write, so all of v1.0
- New: Everything
- Fix: SSL hack to use our wildcard certificate
- Fix: Using threads instead of
AsyncTask
, asAsyncTask
is slow - Fix: Fixed odd line breaks in Pageflip HTML
Initial release.