Coder Social home page Coder Social logo

hypertrack / live-app-android Goto Github PK

View Code? Open in Web Editor NEW
715.0 71.0 217.0 30.54 MB

Build live location sharing in your Android app

Home Page: https://play.google.com/store/apps/details?id=com.hypertrack.live

License: MIT License

Java 75.63% Kotlin 24.37%
location location-services locations location-based-services fusedlocation fusedlocationapi livelocation eta

live-app-android's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

live-app-android's Issues

App crash

when you come to foreground by clicking on the notification and your location service is disable you are asked to enable the gps. if you click on the cancel button the app crashes every time.

device: moto g3
OS : 6.0.1

Problem with Persistent notification

Hi Team,
I have added Hypertrack sdk in my application. But i am facing an issue with persistent notifications while live location is shared. I am not able to set launch mode for the activity class which should be opened when this notification is tapped.
In ServiceNotificationParamsBuilder we can only set activity class name (setContentIntentActivityClass()) and extra data with intent (setContentIntentExtras()). Is there any method to set launch modes for intent?

Please help.

Thanks,
kajol

Invalid token error

PI gives this error createUser: 403: You do not have permission to access the resource. {"detail":"Invalid token."}. I have already applied my test production key in key.properties

Eaxmple app issue

E/Volley: [826] BasicNetwork.performRequest: Unexpected response code 402 for https://api.hypertrack.com/api/v1/actions/
05-16 12:30:23.831 20544-20544/io.hypertrack.sendeta E/NetworkManagerImpl: 402: Payment needs to be enabled for using Actions. {"detail":"You have reached the action limit for your account. To continue using, please visit https://dashboard.hypertrack.com/settings"}
java.lang.RuntimeException: 402: Payment needs to be enabled for using Actions. {"detail":"You have reached the action limit for your account. To continue using, please visit https://dashboard.hypertrack.com/settings"}

at com.hypertrack.lib.internal.common.network.NetworkErrorUtil.getException(NetworkErrorUtil.java:81)
at com.hypertrack.lib.internal.common.network.HTTPClient.processError(HTTPClient.java:356)
at com.hypertrack.lib.internal.common.network.HTTPClient.access$000(HTTPClient.java:31)
at com.hypertrack.lib.internal.common.network.HTTPClient$8.onErrorResponse(HTTPClient.java:134)
at com.android.volley.Request.deliverError(Request.java:564)
at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:101)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

Hypertrack Notification and Stop Running Location Sharing

Hi Hypertrack Team

I am using hypertrack sdk in my app for location sharing. I want to know how we can customize notification icon which is show in app notification bar.

I want to also know, suppose if i am sharing my location to other people and when i stop sharing from other user end so how i can know status of running sharing. on the basis of i have to disable/remove notification icon.

Please suggest me solution for this

Thanks
Gaurav

map is not Showing

whatsapp image 2018-04-12 at 12 53 38 am
please help me out

AIzaSyCO7_e6qLRHE9FWrg3FEAfy4pmGmbrr8_ec BRANCH_LIVE_KEY BRANCH_TEST_KEY

Getting Unexpected response code 502

Hi HyperTrack Team

I am getting unexpected response code : 502

Requested Url : https://api.hypertrack.com/api/v1/users/
Body : UserParams{deviceName='SM-G925I', name='gaurav', phone='null', lookupId='dsgdvgdgsffdtsftfst', photo='null', groupId='null', groupLookupId='null'}

Response : 502: There was an error on the server and we have been notified. Try again later.

<title>502 Bad Gateway</title>

502 Bad Gateway

Please suggest, in which scenario this error will occur

Thansks
Gaurav

Can't sign up on demo app

API gives this error createUser: 403: You do not have permission to access the resource. {"detail":"Invalid token."}. I have already applied my test production key in key.properties

SubscriptionUpdatesRcvr: onFailure: for deviceId

I m getting error when am going to get moment status by passing device id as an argument.

final String deviceID = HyperTrack.getDeviceId(); // o/p 892BC97E-E7B3-4869-AW1A-EVE86A709AE3

hypertrackView = HyperTrackViews.getInstance(LocationTrackActivity.this, HyperTrackPublicKey);
hypertrackView.getDeviceMovementStatus(deviceID,
new Consumer() {
@OverRide
public void accept(MovementStatus movementStatus) {

                }
            }
    );

hypertrackView.subscribeToDeviceUpdates(deviceID, new DeviceUpdatesHandler() {
@OverRide
public void onLocationUpdateReceived(@nonnull Location location) {
Log.d(TAG, "onLocationUpdateReceived: " + location);
}
@OverRide
public void onBatteryStateUpdateReceived(@MovementStatus.BatteryState int i) {
Log.d(TAG, "onBatteryStateUpdateReceived: " + i);
}

        @Override
        public void onStatusUpdateReceived(@NonNull StatusUpdate statusUpdate) {
            Log.d(TAG, "onStatusUpdateReceived: " + statusUpdate);
        }

        @Override
        public void onTripUpdateReceived(@NonNull Trip trip) {
            Log.d(TAG, "onTripUpdateReceived: " + trip);
        }

        @Override
        public void onError(Exception e, String deviceId) {
            Log.w(TAG, deviceId+" :onError: "+e.toString());
        }

        @Override
        public void onCompleted(String deviceId) {
            Log.d(TAG, "onCompleted: " + deviceId);
        }
    });

I am getting error like below.

SubscriptionUpdatesRcvr: onFailure: for deviceId 892BC97E-E7B3-4869-AW1A-EVE86A709AE3
com.apollographql.apollo.exception.ApolloException: Failed to parse subscription response: {data=null, errors=[{path=null, locations=[{line=1, column=877, sourceName=null}], message=Validation error of type FieldUndefined: Field 'generate_estimate' in type 'Destination' is undefined @ 'subscribeToLatestEvent/trip/destination/generate_estimate'}]}
at com.apollographql.apollo.internal.interceptor.AppSyncSubscriptionInterceptor$1$1.run(AppSyncSubscriptionInterceptor.java:105)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.Map.get(java.lang.Object)' on a null object reference
at com.apollographql.apollo.internal.interceptor.AppSyncSubscriptionInterceptor$1$1.run(AppSyncSubscriptionInterceptor.java:79)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
at java.lang.Thread.run(Thread.java:818) 

Demo app ETA always show same value

When I am switching between the tabs for vehicle type selection the request is being made but the response is always same and is not updated on UI.

Hypertrack SDK is not running

Hello,

I tried to follow this https://github.com/hypertrack/live-app-android#usage documentation on this app

With the same computer and smartphone versions also the similar steps to reproduce with this link hypertrack/quickstart-android#24, I produced the same error (Hypertrack SDK is not running).

Expected Behavior

The HyperTrack SDK is running when the app is running as seen in this picture https://hypertrack.com/docs/img/live-ios.jpg.

Actual Behavior

The HyperTrack SDK is running when the app is running.
The proof: the text and background color of the label TextView are "Inactive" (not "Active") and red (not green) as seen in the picture below

Picture

image

Debug

The background color of the label TextView is red because onTrackingStop function inside MainActivity.java is called

public void onTrackingStop() {
      trackingStatus.setActivated(false);
      trackingStatus.setText(R.string.inactive);
      trackingStatusText.setText(String.format(getString(R.string.tracking_is), getString(R.string.disabled).toLowerCase()));
  }

The onTrackingStop function is called because the SDK is not running either inside trackingStateReceiver instance

private BroadcastReceiver trackingStateReceiver = new BroadcastReceiver() {
    @Override
    public void onReceive(Context context, Intent intent) {

        int code = intent.getIntExtra(TrackingStateObserver.EXTRA_KEY_CODE_, 0);
        switch (code) {
            case TrackingStateObserver.EXTRA_EVENT_CODE_START:
                onTrackingStart();
                break;
            case TrackingStateObserver.EXTRA_EVENT_CODE_STOP:
                onTrackingStop();
                break;
            default:
                onError(code);
        }
    }
};

or inside onStateUpdate function

if (hyperTrack != null) {
    if (hyperTrack.isRunning()) {
        onTrackingStart();
    } else {
        onTrackingStop();
    }
}

Hypothesis

I assume that the problem is with my smartphone (because has the same issue as hypertrack/quickstart-android#24) but I don't know what 😂😂😂

Cannot create directory!!

Error:Execution failed for task ':app:packageDebug'.

Cannot create directory C:\Users\admin\Downloads\C1MP\hypertrack-live-android-master\app\build\outputs\apk\debug\C:\Users\admin\Downloads\C1MP\hypertrack-live-android-master\app\build\intermediates\instant-run-resources
capture

Unable to run this app in my Android Studio

I followed step by step the procedure given in the readme but every time I try building the project, I get this error-:
Error:Execution failed for task ':app:fabricGenerateResourcesDebug'.
Crashlytics Developer Tools error.

Please help me out !!!
Curious to contribute to this project ;-)

Live app notification though its not tracking

I have cleared live app in recent apps and also I made sure in playground that device is not tracking. But still if I turn on gps I get to see notification saying searching for location. Hopw you'll fix this.
Attached necessary screenhots
Screenshot_2020-09-01-15-25-46-198_com miui home
Screenshot_2020-09-01-15-25-57-962_com hypertrack live

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.