Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation #3

Closed
2 of 3 tasks
MBach opened this issue Nov 30, 2017 · 3 comments
Closed
2 of 3 tasks

Improve documentation #3

MBach opened this issue Nov 30, 2017 · 3 comments
Assignees

Comments

@MBach
Copy link

MBach commented Nov 30, 2017

Hi,

You should modify the README.md.

  • Imports are missing:

      import com.estimote.cloud_plugin.common.EstimoteCloudCredentials;
      import com.estimote.proximity_sdk.proximity.ProximityObserver;
      import com.estimote.proximity_sdk.proximity.ProximityObserverFactory;
      import com.estimote.internal_plugins_api.cloud.proximity.ProximityAttachment;
    
      import kotlin.jvm.functions.Function1;
    
  • ProximityRule doesn't exist!

  • According to withOnExitAction, it's Function1 and not Function0

      ProximityZone zone1 = proximityObserver.zoneBuilder()
              .forAttachmentKeyAndValue("venue", "office")
              .inFarRange()
              .withOnEnterAction(new Function1<ProximityAttachment, Unit>() {
                  @Override
                  public Unit invoke(ProximityAttachment proximityAttachment) {
                      /* Do something here */
                      return null;
                  }
              })
              .withOnExitAction(new Function1<ProximityAttachment, Unit>() {
                  @Override
                  public Unit invoke(ProximityAttachment proximityAttachment) {
                      /* Do something here */
                      return null;
                  }
              })
              .withOnChangeAction(new Function1<List<? extends ProximityAttachment>, Unit>() {
                  @Override
                  public Unit invoke(List<? extends ProximityAttachment> proximityAttachments) {
                      /* Do something here */
                      return null;
                  }
              })
              .create();
    

Personnaly, I'm not a big fan of underscores in packages names, but it is allowed, so, whatever.

@pawelDylag
Copy link
Contributor

pawelDylag commented Nov 30, 2017

Hey @MBach

Thank you for pointing out those nasty typos - some samples might have been overlooked while updating API changes after 0.1.0-alpha.5 version.

  1. Imports are unnecessary in code samples - the raw functionality must be in focus, not the secondary things. And while you are using modern IDE like Android Studio, it will take care of those imports for you (alt + enter on mac, for example).
  2. You're right - I updated ProximityRule to ProximityZone and added several more fixes according to your suggestions.
  3. Also fixed -> same as above.

I appreciate your opinion on not using underscores in package names. In fact, there is no argumentation against using them (beside pure aesthetics, which is subjective), and it makes long names easier to read - and this is some value to me :)

Let us know about any other ideas that will come to your mind - we're still in alpha, but will soon be production ready :)

Regards,
Paweł

@pawelDylag pawelDylag self-assigned this Nov 30, 2017
@MBach
Copy link
Author

MBach commented Dec 1, 2017

About the imports, in fact there's no javadoc yet, and I'm working with react-native. I mostly use VSCode so I had to manually open the jar in my gradle cache to guess what were the right names. Not really a big deal but it might save some time to others I think.

@pawelDylag
Copy link
Contributor

pawelDylag commented Dec 2, 2017

@MBach, our SDK has no direct support for React Native for now, so you need to do the stuff manually at the moment. We will consider advancing our SDK to be React Native friendly, but honestly, not in the close future.

Good luck with your coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants