Coder Social home page Coder Social logo

altitude's People

Contributors

asksven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

altitude's Issues

[bug] null pointer in MainActivity

in 0.8.2
java.lang.NullPointerException
at com.asksven.betterlatitude.MainActivity.showLocationStatus(MainActivity.java:597)
at com.asksven.betterlatitude.MainActivity.onOptionsItemSelected(MainActivity.java:269)
at android.app.Activity.onMenuItemSelected(Activity.java:2205)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:777)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:532)
at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
at android.view.View$PerformClick.run(View.java:9112)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)

[bug] null pointer exception in LocationService

in 0.8.2
java.lang.NullPointerException
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.readln(HttpURLConnectionImpl.java:1279)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl$ChunkedInputStream.readChunkSize(HttpURLConnectionImpl.java:404)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl$ChunkedInputStream.(HttpURLConnectionImpl.java:340)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getContentStream(HttpURLConnectionImpl.java:1175)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequestInternal(HttpURLConnectionImpl.java:1754)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequest(HttpURLConnectionImpl.java:1649)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:1374)
at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:117)
at com.google.api.client.http.javanet.NetHttpResponse.(NetHttpResponse.java:37)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:83)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:361)
at com.google.api.services.latitude.Latitude$RemoteRequest.execute(Latitude.java:557)
at com.google.api.services.latitude.Latitude$CurrentLocation$Insert.executeUnparsed(Latitude.java:169)
at com.google.api.services.latitude.Latitude$CurrentLocation$Insert.execute(Latitude.java:154)
at com.asksven.betterlatitude.LocationService.setLocationApiCall(LocationService.java:410)
at com.asksven.betterlatitude.LocationService.onLocationChanged(LocationService.java:291)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:219)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:152)
at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:168)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
at dalvik.system.NativeStart.main(Native Method)

[bug] null pointer exception in LocationService

in 0.8.2
java.lang.RuntimeException: Unable to create service com.asksven.betterlatitude.LocationService: java.lang.IllegalArgumentException: provider==null
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2969)
at android.app.ActivityThread.access$3300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: provider==null
at android.location.LocationManager.requestLocationUpdates(LocationManager.java:625)
at com.asksven.betterlatitude.LocationService.registerLocationListener(LocationService.java:212)
at com.asksven.betterlatitude.LocationService.registerLocationListener(LocationService.java:171)
at com.asksven.betterlatitude.LocationService.onCreate(LocationService.java:136)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2959)

[bug] ActivityNotFoundException

v0.9
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=latitude://latitude/friends/location/ flg=0x40400000 }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
at android.app.Activity.startActivityForResult(Activity.java:2827)
at android.app.Activity.startActivity(Activity.java:2933)
at com.asksven.betterlatitude.MainActivity.onOptionsItemSelected(MainActivity.java:296)
at android.app.Activity.onMenuItemSelected(Activity.java:2205)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:748)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:532)
at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
at android.view.View$PerformClick.run(View.java:9210)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
at dalvik.system.NativeStart.main(Native Method)

[feature] separate collection from updating

we want to update latitude every x minutes or every y "distance" while collecting the whole data. So far so good but it means that we will need to "correct" the data afterward.

[feature] rework state for main activity

The state 'not logged in' on the main activity is confusing: not logged in should only be used if there is no Auth token available at all.
Once there is one there is no need to tell 'not logged in' but we should rather take the optimistic approaches and only report an error if the service is not able to call the api

[feature] stop processing location when on wifi

by salleq @ xda

-When connecting to a WiFi, automatically update location (selectable? to force update even if the time interval isn't met?) and do not update location again until WiFi is disconnected

Since I'm not a coder, I cannot tell how much this would save battery, but from a logical viewpoint, if you are connected to the same WiFi for say, 10 hours, your location should not be updated before disconnecting since for that 10 hours your location hasn't changed.,

Edit:

Your idea about wifi is interesting. Even if I can tell if the behavior will impact even more positively on battery I'm ready to give it a try. In order to reach the best battery win I would have to turn off the location listener while on wifi once the last position has been sent but then would have the problem of now knowing when the phone leaves the wifi range. There are some tricky situations to consider here:

  • wifi is turned off
  • the phone goes to sleep and the wifi policy is set to turn wifi off when screen is off
  • you travel but use a portable wifi hotspot ;-)

But anyway I take this up as a feature request and as I have another one related to wifi I may combine them into one iteration.

[bug] Null Pointer Exception

v0.9
java.lang.RuntimeException: Unable to create service com.asksven.betterlatitude.LocationService: java.lang.IllegalArgumentException: provider==null
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2076)
at android.app.ActivityThread.access$2500(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: provider==null
at android.location.LocationManager.requestLocationUpdates(LocationManager.java:441)
at com.asksven.betterlatitude.LocationService.registerLocationListener(LocationService.java:231)
at com.asksven.betterlatitude.LocationService.registerLocationListener(LocationService.java:177)
at com.asksven.betterlatitude.LocationService.onCreate(LocationService.java:142)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2066)

[bug] Notification does not show when geo is off

by cdmackay @ xda
Possible bug...

On ICS.. If I have notification icon turned on, but geodata turned off, then the notification icon doesn't appear.

With both settings on, the icon appears correctly, but not when geodata is off.

The service is definitely still running: Latitude is still being updated.

I'm on THS ICS, b17.

Thanks much.

[feature] show connection status on main screen

ow do I know if I'm log on or log off to the app? Everytime I press log on, it always takes me to Google authorization page even though I just did that 1 minute ago. (feature suggestion: maybe you could explicitly state in the blank area of the app if the service is being active) though I just did that 1 minute ago. (feature suggestion: maybe you could explicitly state in the blank area of the app if the service is being active)

[bug] why in preferences there are two times Interval and Accuracy settings?

Reported by MichunB@xda
there are two setings interval/accuracy because the first one controls the location manager of the service updating latitude the other one controling the location manager used for locating you on the map.
I decided to split those because you may have higher requirements while using the map. The location manager of the map is of course only active when the map is open.

[bug] null pointer in DataNetwork

in 0.8.2
java.lang.NullPointerException
at com.asksven.android.common.networkutils.DataNetwork.hasDataConnection(DataNetwork.java:37)
at com.asksven.betterlatitude.LocationService.setLocationApiCall(LocationService.java:352)
at com.asksven.betterlatitude.LocationService.onLocationChanged(LocationService.java:291)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:252)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:171)
at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:187)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)

[feature] add an option to update location whenever connected to wifi

Since Latitude uses wifi location (if enabled) a lot, it would be great to force altitude update on wifi connect.

You'll want to use the ConnectivityManager. To check if WiFi specifically is enabled, do:

ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
if( ! cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnectedOrConnecting() ) {
    // do your stuff 
}

To make sure that a connection can be established, try connecting to a site. Here's an example:

    URL url = new URL( websiteAddress );
    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.setRequestProperty("User-Agent", "yourAgent");
    connection.setRequestProperty("Connection", "close");
    connection.setConnectTimeout(1000);
    connection.connect();

    if (connection.getResponseCode() == 200) {
        return true;
    }

[feature] add threshold for errors

for some reason (ideas welcome) I'm getting a notification about a 401 failed login attempt like every other day or so. Without me doing anything it starts working again afterwards. I'd suggest adding a "only notify about failed login attempts after X succeeding login attempts have failed" option so I can set it to only notify me after 3 or 5 failed attempts cause then something is likely really wrong.

edit: when i just disabled wifi the moment altitude tried to update i got a notification about the host being unavailable. please include that kind of error messages in such a setting. I don't care whether 1 or 2 updates fail, Latitude is not that important. I want to know when there's something really wrong (e.g. I've been logged out for some reason) but not about every little quirks

[bug] FC if no location provider present

report by somecanuck @ xda
E/AndroidRuntime(14950): Caused by: java.lang.IllegalArgumentException: provider==null
E/AndroidRuntime(14950): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:441)
E/AndroidRuntime(14950): at com.asksven.betterlatitude.LocationService.registerLocationListener(LocationService.java:212)
E/AndroidRuntime(14950): at com.asksven.betterlatitude.LocationService.registerLocationListener(LocationService.java:171)
E/AndroidRuntime(14950): at com.asksven.betterlatitude.LocationService.onCreate(LocationService.java:136)
E/AndroidRuntime(14950): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2066)

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.