<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 5:57 AM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Ron,<div><br></div><div>thanks for the mail - let me try to bring some light into the dark<br><div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Nov 2, 2015 at 8:38 PM, Ron Smeral <span dir="ltr">&lt;<a href="mailto:rsmeral@redhat.com" target="_blank">rsmeral@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I noticed the &quot;deviceType&quot; field in UPS seems to be used inconsistently between Server and the SDKs, and is perhaps underspecified.<br>
<br>
The docs only say this much:<br>
<a href="https://aerogear.org/docs/unifiedpush/client-registration/" rel="noreferrer" target="_blank">https://aerogear.org/docs/unifiedpush/client-registration/</a><br>
* &quot;deviceType: The device type of the device or the user agent.&quot;<br>
- what does &quot;device type of the device&quot; mean? &quot;Type&quot; in what sense?<br></blockquote><div><br></div><div><br></div></span><div>like here:</div><div><a href="https://github.com/aerogear/aerogear-push-ios-demo/blob/master/PushTest/AGAppDelegate.m#L82" target="_blank">https://github.com/aerogear/aerogear-push-ios-demo/blob/master/PushTest/AGAppDelegate.m#L82</a><br></div><div><br></div><div>the iOS API read the type of the device (eg. iPod, iPad, iPhone) etc.</div><div><br></div><div>It&#39;s stored on the server&#39;s metadata. Presented to the user, on the admin UI, when browsing the registered devices for a Variant. Below is an example from our users doc:</div><div><a href="https://aerogear.org/docs/unifiedpush/ups_userguide/index/#_importing_device_metadata" target="_blank">https://aerogear.org/docs/unifiedpush/ups_userguide/index/#_importing_device_metadata</a><br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<a href="https://aerogear.org/docs/unifiedpush/push-message-format/" rel="noreferrer" target="_blank">https://aerogear.org/docs/unifiedpush/push-message-format/</a><br>
* &quot;deviceType: A list of raw device types that should receive the message (e.g. Coupon only for iPad and AndroidTablets). The deviceType needs to be stored when the device is registering itself with the server.&quot;<br>
- what&#39;s a &quot;raw device type&quot;?<br>
- &quot;needs to be stored&quot; - who needs to do that? Store where?<br></blockquote><div><br></div></span><div>This API is to actually sent the message to the registered devices - device type here is a filter.</div><div>Example: you have a generic iOS variant, and have a few iPods, a few iPhone and a few iPads, this filter allows you to just sent messages to all iPhones, by specifiying iphone.</div><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
When trying to use the Sender API, the obvious question is: what&#39;s the list of possible values? The docs don&#39;t answer that.<br></blockquote><div><br></div></span><div>here is our current version of the doc:</div><div><a href="https://aerogear.org/docs/specs/aerogear-unifiedpush-rest/sender/index.html#POST" target="_blank">https://aerogear.org/docs/specs/aerogear-unifiedpush-rest/sender/index.html#POST</a><br></div><div><br></div><div><br></div><div>but we have a new online in a few days (after the 1.1.0.Finall is out)</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Another missing piece of information:<br>
* Is the deviceType an arbitrary string set by the user during registration?<br></blockquote><div><br></div></span><div>usually that&#39;s done by the application (develoiper), not the directly the end user of the phone</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
* Or, is it somehow automatically set by the client SDKs?<br></blockquote><div><br></div></span><div>yeah :-) but not enforced</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
After a bit of digging through the SDKs and APIs, I can see this (not necessarily 100% correct):<br>
<br>
* The Sender API accepts arbitrary values<br>
<br>
* Android SDK - has deviceType in model, sets to &quot;ANDROID&quot; by default<br>
* Windows SDK - doesn&#39;t even have deviceType in model<br>
* iOS SDK - has deviceType in model, doesn&#39;t set to any default value<br>
<br>
* Cordova Android - doesn&#39;t set, so uses &quot;ANDROID&quot;<br>
* Cordova WP8 - not in model, not set<br>
* Cordova iOS - sets UIDevice.model (I can&#39;t really read ObjC, just a guess by looking at the code)<br>
<br>
<br>
Can we come up with clearer semantics for the deviceType field?<br></blockquote><div><br></div></span><div>Looks like on Windows it is missing - perhaps we should add that.</div><div>On Android, I agree the SDK should not set any default here - but I am not sure if there is an equivalent API around like UIDevice, which would the app developer allow to specifiy the actual device type.  </div></div></div></div></div></div></blockquote><div><br></div><div>You are right, we don&#39;t have API like UIDevice. To check if it&#39;s a tablet or a phone we need to check the screen size<br><a href="http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts">http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"><div class="gmail_quote"><div>Mind filing a few JIRAs against: AGDROID, AGWIN to get the functionality baked into the native SDKs, and against AGCORDOVA to get this into there as well, once the native bits are done.</div><div><br></div><div>Great find, Ron!</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks,<br>
Ron<br>
<span><font color="#888888"><br>
--<br>
Ron Smeral<br>
Technical Writer, FeedHenry<br>
Red Hat<br>
Brno<br>
_______________________________________________<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/mailman/listinfo/aerogear-dev</a><br>
</font></span></blockquote></span></div><span class=""><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</font></span></div></div></div></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">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/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">-- Passos<br></div></div>
</div></div>