Coder Social home page Coder Social logo

ploggy's People

Contributors

adam-p avatar adamkruger avatar rod-hynes avatar

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

Watchers

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

ploggy's Issues

App crash while adding friend (rotation related?)

FATAL EXCEPTION: main
Process: ca.psiphon.ploggy, PID: 9535
java.lang.RuntimeException: Unable to destroy activity {ca.psiphon.ploggy/ca.psiphon.ploggy.ActivityMain}: java.lang.IllegalArgumentException: Missing event handler for an annotated method. Is class ca.psiphon.ploggy.ActivityMain$FriendListFragment registered?
  at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3478)
  at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3496)
  at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3696)
  at android.app.ActivityThread.access$800(ActivityThread.java:135)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:137)
  at android.app.ActivityThread.main(ActivityThread.java:4998)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
  at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: Missing event handler for an annotated method. Is class ca.psiphon.ploggy.ActivityMain$FriendListFragment registered?
  at com.squareup.otto.Bus.unregister(Bus.java:288)
  at ca.psiphon.ploggy.Events.unregister(Events.java:54)
  at ca.psiphon.ploggy.ActivityMain$FriendListFragment.onDestroy(ActivityMain.java:194)
  at android.app.Fragment.performDestroy(Fragment.java:1913)
  at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1013)
  at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
  at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1044)
  at android.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:1881)
  at android.app.Activity.performDestroy(Activity.java:5414)
  at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1117)
  at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3465)
  ... 12 more

I believe that I rotated the device at the same time I was add-friend-beaming. And we have seen other rotation bad behaviour.

Your Status tab isn't refreshed after identity generation

After creating your first identity, the Your Status tab is blank until you navigate away and back to it. It then shows the Identity and Message sections. If you do not navigate, it eventually refreshes itself when a location fix is completed.

After re-generating your identity, the same thing happens, except the Your Status tab is displaying your old identity until it refreshes.

Add identity file import feature

This is an offshoot of issue #11.

There is a command to export the user's identity to a file, but there's no command to add a friend from a file (like, with a file chooser and whatnot).

This is somewhat mitigated by the fact that a file explorer can be used to exercise the file extension association and begin the friend-add.

LocationMonitor should wait until Tor circuit established

As it is now, LocationMonitor may start making reverse geocode requests to the Nominatim server before Tor is bootstrapped and the circuit is established (this is more likely the happen if the circuit is being built from scratch). This results in the reverse geocode requests failing. This can be seen in the activity log as something like this:

Nominiatim reverse geocode failed: java.net.UnknownHostException: Unable to resolve host "blah.onion": No address associated with hostname.

Fix: Don't make reverse geocode requests until the Tor circuit is established.

Engine already gets told when the circuit is established. Either we could expose that state to LocationMonitor, or just not start LMing until the signal is received (like what's done with friend polling).

TBD: Will the fix prevent the LocationMonitor from running at all, or just from doing reverse geocoding? (I think the former, since the user probably isn't very interested in their own raw lat/long.)

Use correct file association intent filters

The current "open this file type with Ploggy" intent filters are incorrect. This is because the the scheme attribute is missing -- from the documentation: "If a scheme is not specified for the intent filter, all the other URI attributes are ignored". The result is that the intent filter matches all content:// and file:// URIs with a MIME type of application/octet-stream, regardless of file extension.

Here are the correct intent-filter items (I think):

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <action android:name="android.intent.action.EDIT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <category android:name="android.intent.category.DEFAULT" />
  <data
      android:scheme="file"
      android:mimeType="*/*"
      android:host="*" />
  <data android:pathPattern=".*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ploggy" />
</intent-filter>
<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <action android:name="android.intent.action.EDIT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <category android:name="android.intent.category.DEFAULT" />
  <data
      android:scheme="content"
      android:mimeType="*/*"
      android:host="*" />
  <data android:pathPattern=".*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ploggy" />
</intent-filter>
<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <action android:name="android.intent.action.EDIT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <category android:name="android.intent.category.DEFAULT" />
  <data
      android:scheme="https"
      android:mimeType="*/*"
      android:host="*" />
  <data android:pathPattern=".*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ploggy" />
</intent-filter>
<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <action android:name="android.intent.action.EDIT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <category android:name="android.intent.category.DEFAULT" />
  <data
      android:scheme="http"
      android:mimeType="*/*"
      android:host="*" />
  <data android:pathPattern=".*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ploggy" />
  <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ploggy" />
</intent-filter>

(For info on the ridiculous .*\\..*\\. stuff, see this SO answer.)

This will associate URIs with file, content, https, and http schemes that end with *.ploggy with Ploggy. (Maybe there should be more exotic schemes? ftp? ...?)

Great! Except...

content:// URIs don't contain the filename -- see the documentation. And content URIs are used by what will surely be the two most common ways to open a .ploggy file: Gmail and the Downloads manager. (Gmail seems to create URIs like content://gmail-ls/username@domain/messages/501/attachments/0.1/BEST/false and Downloads like content://downloads/all_downloads/375.)

So the intent filter for content:// will never match.


The only idea I have so far to address the content:// problem is to attach the file with an application/ploggy MIME type, add an intent filter for that type (i.e., keep the existing one), and hope that Gmail opens the attachment with that MIME type. And further hope that Gmail somehow saves that MIME type as metadata when saving the file to Downloads, and then Downloads uses it. (So, do some experiments before committing to this path.)

This will not be very easy to do -- there's a description here. But possible.

does this app work in android studio gradle framework

Hello, i tried to import this app in gradle framework and run it. App got compiled and installed, but then it is stuck on main screen and keeps on flashing. Is this because of android studio or something in code is not working.

Enable/disable services when connections go up/down

The Tor service should only run when the device has connectivity. Peer pulling and Nominatim requests (etc.) should only be done when the Tor circuit is established.

Relatedly, Briar has added Tor-disabling-triggered-by-Android-Connectivity-Manager: http://sourceforge.net/p/briar/prototype/ci/c779d7b95a0af06f0b1977f2e5daee886bcfe42e/tree/briar-android/src/org/briarproject/plugins/tor/TorPlugin.java?diff=0cebc42ddbb5b6651651c6c3d84be48259410f48.

This is related to issue #37

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.