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

Valencia service #3585

Merged
merged 12 commits into from
Feb 23, 2016
Merged

Valencia service #3585

merged 12 commits into from
Feb 23, 2016

Conversation

oxtoacart
Copy link
Contributor

@myleshorton @atavism

This adds support for running the embedded Lantern as a service via Lantern.enableAsService(). The testbed app is updated to support testing both regular embedded as well as service-mode embedded.

* classloader (i.e. to avoid loading native dependencies when running as service). This is
* important because in some situations, it appears that including the Lantern native library
* inside the same process as an application can cause instability on some phones (e.g. Samsung
* Galaxy S4).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is important - it turns out that simply loading the native library into the Manoto app introduced instability. I structured Lantern so that simply importing it does not cause the native library to get loaded. That now happens only when the proxy is started, which when running as a service happens in a separate process.

@oxtoacart
Copy link
Contributor Author

@atavism @myleshorton What do you think? Merge worthy?

@myleshorton
Copy link
Contributor

I'm still knocking this around a little bit @oxtoacart

// Track extra info about Android for logging to Loggly.
EmbeddedLantern.addLoggingMetadata("androidDevice", android.os.Build.DEVICE);
org.lantern.mobilesdk.Lantern.addLoggingMetadata("androidModel", android.os.Build.MODEL);
org.lantern.mobilesdk.Lantern.addLoggingMetadata("androidSdkVersion", "" + android.os.Build.VERSION.SDK_INT + " (" + android.os.Build.VERSION.RELEASE + ")");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not want to log to Loggly in the service case @oxtoacart? I can definitely see not doing it, but want to make sure that's intentional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to log to Loggly so that we get feedback on any issues that might be encountered by users of the embedded version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm guess I'm asking the opposite: do we also want to log to Loggly for the service version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, now I understand your question. The service uses EmbeddedLantern, so they both already log to Loggly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see - I missed that! Cool thanks @oxtoacart.

@myleshorton
Copy link
Contributor

All good on this PR from my end @atavism and @oxtoacart.

@atavism
Copy link
Contributor

atavism commented Feb 23, 2016

Same here. Let's go head and merge this! Thanks, @oxtoacart!

atavism pushed a commit that referenced this pull request Feb 23, 2016
@atavism atavism merged commit 6451d24 into valencia Feb 23, 2016
@atavism atavism deleted the valencia-service branch February 23, 2016 22:02
@oxtoacart
Copy link
Contributor Author

@atavism @myleshorton Thanks for the review! I've opened #3633 for the WebView thing.

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

Successfully merging this pull request may close these issues.

3 participants