project-travel-mate / travel-mate Goto Github PK
View Code? Open in Web Editor NEWA complete travel guide!
Home Page: https://project-travel-mate.github.io
License: MIT License
A complete travel guide!
Home Page: https://project-travel-mate.github.io
License: MIT License
change all the toast messages in the app to snackbar messages.
See title
Right now, the user directly gets logged in after sign up.
Change the responses for the get-city-hotels.php
.
If the response from Here API is empty or if the city ID is incorrect, send the responses accordingly
Note : Take reference from bus-booking.php
Show a confirmation alert after user clicks on sign out
When I run and test the app on my emulator, the app crashes when I try to type in the search bar on the main page (destinations). Sometimes it also randomly crashes when I click on some of options in the navigation drawer. Not sure if it's because of my emulator or if it's a bug. Anyways, here is the log:
06-22 17:22:08.291 18492-18492/tie.hackathon.travelguide E/AndroidRuntime: FATAL EXCEPTION: main
Process: tie.hackathon.travelguide, PID: 18492
android.os.NetworkOnMainThreadException
at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1273)
at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249)
at libcore.io.IoBridge.recvfrom(IoBridge.java:549)
at java.net.PlainSocketImpl.read(PlainSocketImpl.java:481)
at java.net.PlainSocketImpl.-wrap0(PlainSocketImpl.java)
at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
at okio.Okio$2.read(Okio.java:138)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:238)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:325)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:314)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)
at okhttp3.internal.http.Http1xStream$ChunkedSource.readChunkSize(Http1xStream.java:434)
at okhttp3.internal.http.Http1xStream$ChunkedSource.read(Http1xStream.java:418)
at okhttp3.internal.Util.skipAll(Util.java:176)
at okhttp3.internal.Util.discard(Util.java:158)
at okhttp3.internal.http.Http1xStream$ChunkedSource.close(Http1xStream.java:455)
at okio.RealBufferedSource.close(RealBufferedSource.java:434)
at okio.RealBufferedSource.close(RealBufferedSource.java:434)
at okio.InflaterSource.close(InflaterSource.java:126)
at okio.GzipSource.close(GzipSource.java:182)
at okio.RealBufferedSource.close(RealBufferedSource.java:434)
at okhttp3.internal.Util.closeQuietly(Util.java:88)
at okhttp3.ResponseBody.bytes(ResponseBody.java:130)
at okhttp3.ResponseBody.string(ResponseBody.java:154)
at tie.hackathon.travelguide.CityFragment$1.lambda$-tie_hackathon_travelguide_CityFragment$1_lambda$6(CityFragment.java:126)
at tie.hackathon.travelguide.-$Lambda$19.$m$0(Unknown Source)
at tie.hackathon.travelguide.-$Lambda$19.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
File to be refactored : https://github.com/Swati4star/Travel-Mate/blob/master/APIs/online-shopping.php
Constants file : https://github.com/Swati4star/Travel-Mate/blob/master/APIs/inc/constants.inc.sample
In this screen, there are no items getting displayed. In case there is no item there should be an appropriate placeholder image to indicate the same instead of just showing the progress bar.
The icon right now is of sharing.
for example :
in Activity :
public static Intent getStartIntent(Context context, User user) {
Intent intent = new Intent(context, ThisActivity.class);
intent.putParcelableExtra(EXTRA_USER, user);
return intent;
}
or in Fragment
public static UserFragment newInstance(User user) {
UserFragment fragment = new UserFragment();
Bundle args = new Bundle();
args.putParcelable(ARGUMENT_USER, user);
fragment.setArguments(args)
return fragment;
}
Find stacktrace below:
05-12 13:23:39.579 21992-21992/tie.hackathon.travelguide E/AndroidRuntime: FATAL EXCEPTION: main
Process: tie.hackathon.travelguide, PID: 21992
java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener(Landroid/view/View;Landroid/support/v4/view/OnApplyWindowInsetsListener;)V in class Landroid/support/v4/view/ViewCompatLollipop; or its super classes (declaration of 'android.support.v4.view.ViewCompatLollipop' appears in /data/app/tie.hackathon.travelguide-1/base.apk)
at android.support.v4.view.ViewCompat$LollipopViewCompatImpl.setOnApplyWindowInsetsListener(ViewCompat.java:1558)
at android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(ViewCompat.java:2819)
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:410)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:300)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:264)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
at tie.hackathon.travelguide.Splash.onCreate(Splash.java:17)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Currently monuments or near by attractions are detected using estimote beacons but we decided to remove it to improve usability and scalability of the app.
Instead, use the current GPS location of the user and constantly poll (in certain interval ~600 seconds) the server providing the GPS coordinates and the proximity radius (in meters) to get a list of attractions near-by and accordingly send out a push notification.
Expected: The loader should be dismissed.
Change the responses for the places-api.php
If the response from Here API is empty or if the city ID is incorrect, send the responses accordingly
Note : Take reference from bus-booking.php
Ref: https://github.com/checkstyle/checkstyle
Integrate checkstyle to make the java code uniform
Hello,
Would you be interested in publishing this app on F-Droid?
As soon as I press login or register button, app crashes.
Here are stack traces:
FATAL EXCEPTION: OkHttp Dispatcher
Process: tie.hackathon.travelguide, PID: 2617
java.lang.RuntimeException: Can't toast on a thread that has not called Looper.prepare()
at android.widget.Toast$TN.(Toast.java:390)
at android.widget.Toast.(Toast.java:114)
at android.widget.Toast.makeText(Toast.java:277)
at android.widget.Toast.makeText(Toast.java:267)
at tie.hackathon.travelguide.login.LoginActivity.showError(LoginActivity.java:135)
at tie.hackathon.travelguide.login.LoginPresenter$1.onFailure(LoginPresenter.java:61)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:133)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
05-16 19:21:05.693 2617-2636/tie.hackathon.travelguide D/EGL_emulation: eglMakeCurrent: 0xa855eb40: ver 3 0 (tinfo 0xa8561820)
05-16 19:21:06.517 2617-2617/tie.hackathon.travelguide E/WindowManager: android.view.WindowLeaked: Activity tie.hackathon.travelguide.login.LoginActivity has leaked window DecorView@11fdb43[] that was originally added here
at android.view.ViewRootImpl.(ViewRootImpl.java:485)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:346)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
at android.app.Dialog.show(Dialog.java:330)
at com.afollestad.materialdialogs.MaterialDialog.show(MaterialDialog.java:1350)
at com.afollestad.materialdialogs.MaterialDialog$Builder.show(MaterialDialog.java:1341)
at tie.hackathon.travelguide.login.LoginActivity.showLoadingDialog(LoginActivity.java:145)
at tie.hackathon.travelguide.login.LoginPresenter.ok_signUp(LoginPresenter.java:47)
at tie.hackathon.travelguide.login.LoginActivity.onClick(LoginActivity.java:112)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
How to solve this error..
Description
Update Gradle version from 4.4
to 4.6
.
Would you like to work on the issue?
Yes.
Hello,
I built 896f06a from source.
When I launch, it crashes with the following error:
05-27 17:07:35.800 4711 4711 D AndroidRuntime: Shutting down VM
05-27 17:07:35.801 4711 4711 E AndroidRuntime: FATAL EXCEPTION: main
05-27 17:07:35.801 4711 4711 E AndroidRuntime: Process: io.github.project_travel_mate, PID: 4711
05-27 17:07:35.801 4711 4711 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate application io.github.project_travel_mate.MyApplication: java.lang.IllegalAccessException: java.lang.Class<io.github.project_travel_mate.MyApplication> is not accessible from java.lang.Class<android.app.Instrumentation>
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:578)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.app.ActivityThread.access$1600(ActivityThread.java:150)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: Caused by: java.lang.IllegalAccessException: java.lang.Class<io.github.project_travel_mate.MyApplication> is not accessible from java.lang.Class<android.app.Instrumentation>
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.app.Instrumentation.newApplication(Instrumentation.java:997)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.app.Instrumentation.newApplication(Instrumentation.java:982)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:573)
05-27 17:07:35.801 4711 4711 E AndroidRuntime: ... 9 more
05-27 17:07:35.803 2055 4332 W ActivityManager: Force finishing activity io.github.project_travel_mate/.Splash
If the user has not generated connection.inc.php file, he should get a more verbose error asking him to add the file.
On signup :
Show proper error messages for each.
currently app architecture is pretty much is mixed up , we could decompose it nicely , also there is many repeated code as you know , so i think it is good idea , i would work on those issues.
The top bar is white in colour in the following activities:
checklist, select more of transport, train, bus, car, hotel, online shopping, real-time locator, fun facts
change it to blue.
Reference:
A similar fix has been resolved in #64.
For Sign in and Sign up processes, accept email address instead of phone number.
Would be very good for First timers. I can work on it.
There are still a lot of pieces of code where butterknife is not integrated.
FinalCityInfo
TweetsAdapter
PlacesOnMap
FunfactFragment
CityAdapter
Checklist
ChecklistFragment
ShareContact
MyTripFriendnameAdapter
MyTripInfoImagesAdapter
BusAdapter
MyTripInfo
Hotels
ShoppingAdapter
TrainAdapter
MapRealTimeActivity
TripImage
MyTripsAdapter
Use butterknife in above files.
Actual Behaviour
Building the latest master
branch fails due to Known Issues with Android Plugin for Gradle 3.1.2.
Expected Behaviour
To prevent build from failing, we should downgrade to Android Plugin for Gradle 3.1.1 until a new version fixes it. (3.1.3 also doesn't fix it)
Steps to reproduce it
Pull the latest changes of the development branch and try to build the project.
LogCat for the issue
Error message: Configuration on demand is not supported by the current version of the Android Gradle plugin since you are using Gradle version 4.6 or above. Suggestion: disable configuration on demand by setting org.gradle.configureondemand=false in your gradle.properties file or use a Gradle version less than 4.6.
Would you like to work on the issue?
Yes.
I got an error like this for the first time app launch
I use Genymotion Samsung s6 6.0.0
02-08 10:26:51.153 3579-3594/tie.hackathon.travelguide E/AndroidRuntime: FATAL EXCEPTION: BeaconServiceThread
Process: tie.hackathon.travelguide, PID: 3579
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.bluetooth.BluetoothAdapter.isEnabled()' on a null object reference
at com.estimote.sdk.service.internal.JellyBeanBluetoothAdapter.start(JellyBeanBluetoothAdapter.java:43)
at com.estimote.sdk.service.internal.CycleBluetoothScanner.start(CycleBluetoothScanner.java:64)
at com.estimote.sdk.service.BeaconService.startScanning(BeaconService.java:336)
at com.estimote.sdk.service.BeaconService.startMonitoring(BeaconService.java:286)
at com.estimote.sdk.service.BeaconService.access$300(BeaconService.java:69)
at com.estimote.sdk.service.BeaconService$IncomingHandler$1.run(BeaconService.java:440)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
02-08 10:26:51.670 3579-3592/tie.hackathon.travelguide E/Surface: getSlotFromBufferLocked: unknown buffer: 0xdf0e9a60
i have upload API in http://abc.in website and give the following API Link into the Android Code
public static String apilink = "http://abc.in";
but this i not working. Request please correct where i am wrong
csinsit.org/prabhakar/tie/
this URL has been expired So Application is not working , it gets crashed as soon as we launch it.
As mentioned in the hierarchy in this file.
description and fun facts are already there in destinations folder.
Move Tweets
and PlacesOnMap
activities also to this folder.
Hi there
i rly like this project: the idea, the features amazing. and i would love to to localize it and modify to my need but the problem is i'm kinda new to Android studio and i can't seems to be able to open and edit the files. so would you be so kind and give me some tips.
thanks in advance :)
I was playing around with the code and found that the app crashes when "City Trends" is clicked. Here's the crash log ->
org.json.JSONException: End of input at character 0 of
05-15 15:51:57.119 2857-2857/tie.hackathon.travelguide W/System.err: at org.json.JSONTokener.syntaxError(JSONTokener.java:450)
05-15 15:51:57.119 2857-2857/tie.hackathon.travelguide W/System.err: at org.json.JSONTokener.nextValue(JSONTokener.java:97)
05-15 15:51:57.119 2857-2857/tie.hackathon.travelguide W/System.err: at org.json.JSONArray.(JSONArray.java:92)
05-15 15:51:57.119 2857-2857/tie.hackathon.travelguide W/System.err: at org.json.JSONArray.(JSONArray.java:108)
05-15 15:51:57.119 2857-2857/tie.hackathon.travelguide W/System.err: at tie.hackathon.travelguide.Tweets$1.-tie_hackathon_travelguide_Tweets$1_lambda$2(Tweets.java:110)
05-15 15:51:57.121 2857-2857/tie.hackathon.travelguide W/System.err: at tie.hackathon.travelguide.Tweets$1$-void_onResponse_okhttp3_Call_call_okhttp3_Response_response_LambdaImpl0.run(Tweets.java)
05-15 15:51:57.121 2857-2857/tie.hackathon.travelguide W/System.err: at android.os.Handler.handleCallback(Handler.java:739)
05-15 15:51:57.124 2857-2857/tie.hackathon.travelguide W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
05-15 15:51:57.125 2857-2857/tie.hackathon.travelguide W/System.err: at android.os.Looper.loop(Looper.java:135)
05-15 15:51:57.127 2857-2857/tie.hackathon.travelguide W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5254)
05-15 15:51:57.127 2857-2857/tie.hackathon.travelguide W/System.err: at java.lang.reflect.Method.invoke(Native Method)
05-15 15:51:57.127 2857-2857/tie.hackathon.travelguide W/System.err: at java.lang.reflect.Method.invoke(Method.java:372)
05-15 15:51:57.127 2857-2857/tie.hackathon.travelguide W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
05-15 15:51:57.127 2857-2857/tie.hackathon.travelguide W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
The URL being called is -> "http://csinsit.org/prabhakar/tie/city/trends/twitter.php?city=2", which basically doesn't return any data, hence the JSON Exception.
The following activities need to be moved to travel folder:
My Trips
, MyTripsInfo
SelectModeOfTransport
TrainList
, BusList
, CarDirections
Hotels
ShoppingCurrentCity
MapRealTimeActivity
Hi, i have set the constants and connection file and all php file work fine, but the file places-api give me an error type 500. Could you help me?
Thanks in advance
Login to the app
Go to Emergency contacts
Click on any 'CALL' button.
The app crashes.
is there any reason , there is no use of butterknife? thanks in advance.
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.