couchbaselabs / mobile-travel-sample Goto Github PK
View Code? Open in Web Editor NEWMobile Version of Travel sample App using Couchbase Lite 2.x
Mobile Version of Travel sample App using Couchbase Lite 2.x
Step:
Hi Could you please add this functionality in this as i am unable to stop replicator before deleting the couchbase lite db.
thanks
For Windows VS users, update instructions for indicating nuget source and pre-release pkg instructions
http://docs-build.sc.couchbase.com:9000/develop/java#/2/3/2
First, you initialize the URL object which points to the Sync Gateway instance to synchronize with.
It should be URI
Tab controller for hotel/flight search. Shows hotel search by default.
http://docs-build.sc.couchbase.com:9000/develop/java#/2/1/2
The code below deletes the "hotels" document from the database every time a hotel is unbookmarked.
In addition to deleting the "hotels" document, the unbookmarking process updates the "bookmarkedhotels" document by removing the the hotel Id hotels array.
In Data Modeling
section, It seems none of documen types is hotels
. It seems hotels
is one of the properties of bookmarkedhotels
document. So Above sentences do not make sense?
guestDoc.setArray("hotels", hotelIds);
is unnecessaryDocument guestDoc = database.getDocument("user::guest");
Array hotelIds = guestDoc.getArray("hotels");
for (int i = 0; i < hotelIds.count(); i++) {
if (hotelIds.getString(i).equals((String) bookmark.get("id"))) {
hotelIds.remove(i);
}
}
guestDoc.setArray("hotels", hotelIds); <<<<<<<
try {
database.save(guestDoc);
} catch (CouchbaseLiteException e) {
e.printStackTrace();
}
.init
is not necessary.
https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L48
Do not need to re-setting the array object.
https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L70
.init
is not necessary.
https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L83
Unclear why the app needs to create/save the hotel doc when bookmarking (Android code doesn't have it).
https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L76-L86
.init
is not necessary.
https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L133
Develop > Security > User Management
In the search box, enter "user:demo" is not correct. It should be "user::demo"
Develop > Security > Access Control
In Try in out section, Typo in "Run the following command in yout terminal."
The replicator's activity issue should be fixed in DB18. The workaround is not necessary.
https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Model/DatabaseManager.swift#L243-L248
It is kind of redundant to create a folder named guest as by default the Database will also create a folder with the database name which is already guest. The default director that the guest folder will be created is also the Application Support folder.
https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Model/DatabaseManager.swift#L89-L97
The following pages are rendering empty
http://mobile-workshop.s3-website-us-east-1.amazonaws.com/deploy/aws
http://mobile-workshop.s3-website-us-east-1.amazonaws.com/deploy/rightscale
(CC @jamiltz )
Reported by Douglas Bonser:
Sync Gateway 2.0 section
The docker link in the following statement on the Manual installation option page does not work (the dropdown at the top of the page works correctly though)
If you would prefer to use a docker container instead, please proceed to the docker section
I get this error when restoring Nugets packages in VS for mac : "Could not restore Nuget packages" when looking at the log it seems to be unable to find Couchbase.Lite.Support.Android nuget package.
I am running the sample app in Visual Studio for Mac 8.0.8 with Xcode 10.2.1. The NuGets have not been updated, the Xamarin Forms is 2.5.0.91635. I do not have a backend installed, so looking up a hotel in Hotel Search throws an exception and the alert dialog for "Error fetching hotels" is triggered. The initialisation for Acr.UserDialogs (6.5.1) is done using:
UserDialogs.Init(() => (Activity)ApplicationContext);
in MainActivity.cs. Instead of showing the alert dialog this fails with an InvalidCastException.
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] System.InvalidCastException: Specified cast is not valid.
[MonoDroid] at TravelSample.Droid.MainActivity.b__0_0 () [0x00000] in /Users/bdegroot/Downloads/mobile-travel-sample-master/dotnet/TravelSample/TravelSample.Android/MainActivity.cs:47
[MonoDroid] at Acr.UserDialogs.UserDialogsImpl.Alert (Acr.UserDialogs.AlertConfig config) [0x0000d] in C:\dev\acr\userdialogs\src\Acr.UserDialogs.Android\UserDialogsImpl.cs:34
[MonoDroid] at Acr.UserDialogs.AbstractUserDialogs.AlertAsync (Acr.UserDialogs.AlertConfig config, System.Nullable`1[T] cancelToken) [0x00054] in C:\dev\acr\userdialogs\src\Acr.UserDialogs.Interface\AbstractUserDialogs.cs:130
[MonoDroid] at TravelSample.Core.ViewModels.HotelListViewModel.LookupAsync () [0x00146] in /Users/bdegroot/Downloads/mobile-travel-sample-master/dotnet/TravelSample/TravelSample.Core/ViewModels/HotelListViewModel.cs:268
[MonoDroid] at TravelSample.Core.ViewModels.HotelListViewModel.<get_LookupCommand>b__13_0 () [0x0001f] in /Users/bdegroot/Downloads/mobile-travel-sample-master/dotnet/TravelSample/TravelSample.Core/ViewModels/HotelListViewModel.cs:221
[MonoDroid] at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in <58604b4522f748968296166e317b04b4>:0
[MonoDroid] at Android.App.SyncContext+<>c__DisplayClass2_0.b__0 () [0x00000] in <788a34f7a7b84486905dfde786529d42>:0
[MonoDroid] at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <788a34f7a7b84486905dfde786529d42>:0
[MonoDroid] at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <788a34f7a7b84486905dfde786529d42>:0
[MonoDroid] at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.34(intptr,intptr)
Changing the line to:
UserDialogs.Init(this);
fixes the problem (in this case).
http://mobile-workshop.s3-website-us-east-1.amazonaws.com/develop/swift#/0/4/0
Apples to Java as well)
Tasks:
Questions:
http://docs-build.sc.couchbase.com:9000/develop/java#/2/4/0
We don't recommend to check Database existence by checking if the file exists.
File dbFile = new File(context.getFilesDir(), "travel-sample.cblite2");
if (!dbFile.exists()) {
DatabaseManager.installPrebuiltDatabase(context, "travel-sample.cblite2.zip");
}
We recommend using following Database static method.
public static boolean exists(String name, File directory)
feature parity with iOS App.
In mobile-travel-sample/android/TravelSample/app/build.gradle file:
implementation 'com.couchbase.lite:couchbase-lite-android-ee:2.7.0'
should be replaced by implementation 'com.couchbase.lite:couchbase-lite-android:2.7.1'
(remove "ee" and use the latest version).
Its very tedious to delete the default entries for airports and dates and re-enter. We want to show auto completion of airports as it demos querying of local database.
Also, once we fix the case where the return dates are optional, it does not make much sense to have default return dates
I'm going through the workshop tutorial, putting some feedback here
http://docs-build.sc.couchbase.com:9000/develop/java#/2/2/0
Following sentence is incorrect.
Create a new user by entering "demo" as the username and "password" for the password. Make sure the "create new user" checkbox is selected.
http://docs-build.sc.couchbase.com:9000/develop/java#/2/5/1
Tap on "+"" button to make a flight reservation
During workshop, quite a few folks were a bit confused with the vagrant install guide
Specifically the statement
"If you're not running this on the day of Couchbase Connect, or don't want to take advantage of the pre-supplied files and instead let them get downloaded automatically, skip the rest of this section and move on to Spin Up & Install: Couchbase Server"
"If you're running through this workshop on the day at Couchbase Connect Silicon Valley, "
Clarify the use of "connect_sv.box" . Basically , update the content so that we assume that users will download installers from GitHub
CC @JFlath
Add a troubleshooting section within the Manual Install guide for Travel Web app to deal with Windows - handle installation of Couchbase Python SDK since it does not work with pip
(CC @JFlath
http://docs-build.sc.couchbase.com:9000/develop/java#/2/2/0
In the search box, enter "user:demo".
This should be "user::demo"
http://docs-build.sc.couchbase.com:9000/develop/java#/2/1/1
document.setArray("hotels",
document
.getArray("hotels")
.addString((String) hotel.get("id"))
);
Following is enough.
document
.getArray("hotels")
.addString((String) hotel.get("id"));
Feature parity with iOS and UWP apps. Also lends itself well to case when return flights are optional
Run the following to fix:
brew link --force --overwrite libcouchbase@2
pip install couchbase==2.5.5
sudo chmod 777 ~/.pyenv/versions/2.7.18/lib/python2.7/site-packages/six-1.15.0.dist-info/RECORD
http://docs-build.sc.couchbase.com:9000/develop/java#/2/3/2
Flight is From SFO to MIA and MIA to SFO. But return flight is top.
When searching for flights, handle case when return dates are not provided
When attempting to bookmark multiple hotels, fails sometimes
Tasks:
The link goes to http://docs-build.sc.couchbase.com:9000/develop/swift#/0/2/1 instead of http://docs-build.sc.couchbase.com:9000/develop/swift#/0/4/1.
Tasks:
Error alerts display a code thats indecipherable . Display user friendly message
https://www.screencast.com/t/ZIrFZ2Rzv
Feature parity with iOS (You can swipe to delete a flight reservation).
"try it out" section under Data Modeling - > Document _id is not possible since none of travel sample docs are getting synced over . So remove it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.