<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">@Wei I think @Daniel point is that this is a trick/workaround. We wouldn&#39;t use this content provider to share anything but to call MobileCore.init only.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span>JOSE MIGUEL</span> <span>GALLAS OLMEDO</span></p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span>ASSOCIATE QE, mobile</span></p><p style="font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat <span><br><br></span></a></p><p style="font-family:overpass,sans-serif;margin:0px 0px 6px;font-size:10px;color:rgb(153,153,153)"><span href="tel:+34618488633">M: <a href="http://redhatemailsignature-marketing.itos.redhat.com/" style="color:rgb(0,136,206);font-size:11px;margin:0px" target="_blank">+34618488633</a>    </span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/profiles/rh/themes/redhatdotcom/img/logo-red-hat-black.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 3 April 2018 at 11:16, Wei Li <span dir="ltr">&lt;<a href="mailto:weil@redhat.com" target="_blank">weil@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">By reading the document, it looks like &quot;ContentProvider&quot; is meant to provide some data for other applications. If we use it for initialising the SDK, what data will be provided to other apps? Is there any other negative side effects of using this approach?<div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Apr 3, 2018 at 9:26 AM, Wojciech Trocki <span dir="ltr">&lt;<a href="mailto:wtrocki@redhat.com" target="_blank">wtrocki@redhat.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Great idea! <br>This will allow SDK to be flexible, developer friendly and more aligned with typical Android patterns.<span><br><br>&gt; <span style="color:rgb(34,34,34);font-family:arial,helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I don&#39;t think removing manual initialisation is too important</span></span><div><font face="arial, helvetica, sans-serif"><br>It will be just side effect after we move to use Android standards like `<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Content provider` etc.<br></span><br></font><div><div><div><div class="gmail_extra"><div><div class="m_-5257699779067529793h5"><br><div class="gmail_quote">On Mon, Apr 2, 2018 at 7:57 AM, Jose Miguel Gallas Olmedo <span dir="ltr">&lt;<a href="mailto:jgallaso@redhat.com" target="_blank">jgallaso@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I don&#39;t think removing manual initialisation is too important, I&#39;d expect that from any other library. However auto-magic is way more elegant and user friendly, so +1 from me.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><span><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">TL;DR what Firebase does is uses a Content Provide[1] (not really created for this) as a trick to initialize the lib before the app starts</blockquote><div><br></div></span><div>Can you provide some reference for this?</div><div><br></div><div>Cheers,</div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800m_8154233206941067210gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span>JOSE MIGUEL</span> <span>GALLAS OLMEDO</span></p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span>ASSOCIATE QE, mobile</span></p><p style="font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat <span><br><br></span></a></p><p style="font-family:overpass,sans-serif;margin:0px 0px 6px;font-size:10px;color:rgb(153,153,153)"><span href="tel:+34618488633">M: <a href="http://redhatemailsignature-marketing.itos.redhat.com/" style="color:rgb(0,136,206);font-size:11px;margin:0px" target="_blank">+34618488633</a>    </span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/profiles/rh/themes/redhatdotcom/img/logo-red-hat-black.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800h5">
<br><div class="gmail_quote">On 29 March 2018 at 23:30, Daniel Passos <span dir="ltr">&lt;<a href="mailto:dpassos@redhat.com" target="_blank">dpassos@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800m_8154233206941067210m_2125578158009107360markdown-here-wrapper"><p style="margin:0px 0px 1.2em!important">Hi,</p>
<p style="margin:0px 0px 1.2em!important">Revisiting some Google and Firebase stuff Summers and I realized the Firebase Android SDK doesn’t need we do any <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">init</code> to the lib starts/be configured.</p>
<p style="margin:0px 0px 1.2em!important">TL;DR what Firebase does is uses a Content Provide[1] (not really created for this) as a trick to initialize the lib before the app starts</p>
<p style="margin:0px 0px 1.2em!important">Why Content provider?</p>
<p style="margin:0px 0px 1.2em!important">Because it has access to the <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">applicationContext</code>[2] and is called <em>before</em> all other Android kinds of stuff in the Android lifecycle (including Application)</p>
<p style="margin:0px 0px 1.2em!important">I’d like to do the same for our Android SDK and initialize the lib using the same trick so we can provide a <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">MobileCore.getInstance()</code> already configured with all the things the developer needs (Logger, HttpLayer, Mobile Services info, etc…) without need to create an application class or call <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">MobileCore.init(context)</code> anywhere and kill all static methods we have today in <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">MobileCore</code></p>
<p style="margin:0px 0px 1.2em!important">It will also allow us to send the default metrics before the Android lifecycle starts the app and have some controls (when need) to know when the app is in background and foreground, listeners possible crashes and other things without the developer needs to call/configure anything.</p>
<p style="margin:0px 0px 1.2em!important">PS: This is will probably be the first step to kill the responsibility to the <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">MobileCore</code> instantiate the Service Modules[3]</p>
<p style="margin:0px 0px 1.2em!important">Any thoughts?</p>
<p style="margin:0px 0px 1.2em!important">[1] <a href="https://developer.android.com/guide/topics/providers/content-providers.html" target="_blank">https://developer.android.com/<wbr>guide/topics/providers/content<wbr>-providers.html</a><br>[2] <a href="https://developer.android.com/reference/android/content/ContentProvider.html#getContext(" target="_blank">https://developer.android.com/<wbr>reference/android/content/Cont<wbr>entProvider.html#getContext(</a>)<br>[3] <a href="https://issues.jboss.org/browse/AGDROID-796" target="_blank">https://issues.jboss.org/brows<wbr>e/AGDROID-796</a></p>
<div title="MDH:PGRpdj5IaSw8YnI+PGJyPlJldmlzaXRpbmcgc29tZSBHb29nbGUgYW5kIEZpcmViYXNlIHN0dWZm
IFN1bW1lcnMgYW5kIEkgcmVhbGl6ZWQgdGhlIEZpcmViYXNlIEFuZHJvaWQgU0RLIGRvZXNuJ3Qg
bmVlZCB3ZSBkbyBhbnkgYGluaXRgIHRvIHRoZSBsaWIgc3RhcnRzL2JlIGNvbmZpZ3VyZWQuPGJy
Pjxicj5UTDt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3MgYmVmb3Jl
IHRoZSBBbmRyb2lkIGxpZmVjeWNsZSBzdGFydHMgdGhlIGFwcCBhbmQgaGF2ZSBzb21lIGNvbnRy
b2xzICh3aGVuIG5lZWQpIHRvIGtub3cgd2hlbiB0aGUgYXBwIGlzIGluIGJhY2tncm91bmQgYW5k
IGZvcmVncm91bmQsIGxpc3RlbmVycyBwb3NzaWJsZSBjcmFzaGVzIGFuZCBvdGhlciB0aGluZ3Mg
d2l0aG91dCB0aGUgZGV2ZWxvcGVyIG5lZWRzIHRvIGNhbGwvY29uZmlndXJlIGFueXRoaW5nLjxi
cj48YnI+PC9kaXY+UFM6IFRoaXMgaXMgd2lsbCBwcm9iYWJseSBiZSB0aGUgZmlyc3Qgc3RlcCB0
byBraWxsIHRoZSByZXNwb25zaWJpbGl0eSB0byB0aGUgYE1vYmlsZUNvcmVgIGluc3RhbnRpYXRl
IHRoZSBTZXJ2aWNlIE1vZHVsZXNbM108YnI+PGRpdj48YnI+QW55IHRob3VnaHRzPzxicj48YnI+
WzFdIGh0dHBzOi8vZGV2ZWxvcGVyLmFuZHJvaWQuY29tL2d1aWRlL3RvcGljcy9wcm92aWRlcnMv
Y29udGVudC1wcm92aWRlcnMuaHRtbDxicj5bMl0gaHR0cHM6Ly9kZXZlbG9wZXIuYW5kcm9pZC5j
b20vcmVmZXJlbmNlL2FuZHJvaWQvY29udGVudC9Db250ZW50UHJvdmlkZXIuaHRtbCNnZXRDb250
ZXh0KCk8YnI+WzNdIGh0dHBzOi8vaXNzdWVzLmpib3NzLm9yZy9icm93c2UvQUdEUk9JRC03OTY8
YnI+PGJyPjxkaXY+PC9kaXY+PGRpdj48L2Rpdj48ZGl2PjwvZGl2PjwvZGl2PjxkaXY+PGRpdj48
L2Rpdj48L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div><span class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800m_8154233206941067210HOEnZb"><font color="#888888"><div><div><div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800m_8154233206941067210m_2125578158009107360gmail-markdown-here-signature m_-5257699779067529793m_-1058732082542345326m_786545526768061800m_8154233206941067210m_2125578158009107360markdown-here-signature">-- <br><div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800m_8154233206941067210m_2125578158009107360gmail_signature"><div dir="ltr">-- Passos<br></div></div>
</div></div></div></font></span></div><span class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800m_8154233206941067210HOEnZb"><font color="#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &quot;Aerogear&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:aerogear+unsubscribe@googlegroups.com" target="_blank">aerogear+unsubscribe@googlegro<wbr>ups.com</a>.<br>
To post to this group, send email to <a href="mailto:aerogear@googlegroups.com" target="_blank">aerogear@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/aerogear/CADF%3Dh2vUzwb1U30O0GB9J4taBkkvAuvUdSkqHEk7jyQfDhK3Og%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank">https://groups.google.com/d/ms<wbr>gid/aerogear/CADF%3Dh2vUzwb1U3<wbr>0O0GB9J4taBkkvAuvUdSkqHEk7jyQf<wbr>DhK3Og%40mail.gmail.com</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/op<wbr>tout</a>.<br>
</font></span></blockquote></div><br></div></div></div><div><div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800h5">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &quot;Aerogear&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:aerogear+unsubscribe@googlegroups.com" target="_blank">aerogear+unsubscribe@googlegro<wbr>ups.com</a>.<br>
To post to this group, send email to <a href="mailto:aerogear@googlegroups.com" target="_blank">aerogear@googlegroups.com</a>.<br></div></div>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/aerogear/CAGsbZmGiRzbG_b5Tp3i-rCYCUNLrms%2BwGd1c_eq2UXyvekGvEw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank">https://groups.google.com/d/ms<wbr>gid/aerogear/CAGsbZmGiRzbG_b5T<wbr>p3i-rCYCUNLrms%2BwGd1c_eq2UXyv<wbr>ekGvEw%40mail.gmail.com</a>.<div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800HOEnZb"><div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800h5"><br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/op<wbr>tout</a>.<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_-5257699779067529793HOEnZb"><font color="#888888">-- <br><div class="m_-5257699779067529793m_-1058732082542345326m_786545526768061800gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span>WOJCIECH</span> <span>TROCKI</span></p><p style="font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px;text-decoration:none" target="_blank">Red Hat <span>Mobile</span></a></p><p style="font-family:overpass,sans-serif;margin:0px 0px 6px;font-size:10px;color:rgb(153,153,153)"><span>IM: <span>wtrocki</span></span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/files/brand/email/sig-redhat.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div></div></div></div></div></div>
</font></span></div></div></div></div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/aerogear-dev</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-5257699779067529793gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span>WEI</span> <span>LI</span></p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span>Principal SOFTWARE ENGINEER</span></p><p style="font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat <span>Mobile</span></a></p><p style="font-family:overpass,sans-serif;margin:0px 0px 6px;font-size:10px;color:rgb(153,153,153)"><span style="margin:0px;padding:0px"><a href="mailto:weil@redhat.com" style="color:rgb(0,136,206);margin:0px" target="_blank">weil@redhat.com</a>   </span> <span>M: <a href="tel:+353862393272" style="color:rgb(0,136,206);font-size:11px;margin:0px" target="_blank">+353862393272</a>    </span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/files/brand/email/sig-redhat.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div></div></div>
</font></span></div>
</blockquote></div><br></div>