[android-developers] DisplayInfo and Detecting WiFi displays
Hi, I'm trying to reliably detect when Miracast is used and the screen id mirrored to a WiFi display. I haven't found in the documentation of android.view.Display any indication of whether the display is WiFi or not. However, when I debug the code I see that the Display object has a member of type DisplayType which has the required information. I'm puzzled to discover that in the AOSP sources there is a function in Display class to retrieve this DisplayInfo, as well as in the sources coming with the SDK. So can I use this function and DisplayInfo? Should I use reflection for that? Is it reliable? Moshe -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)
@Haris.. You would need to store the GCM- Registration Id in the Database(Server side) so that the Server API/Webservice api/ should able to pick the Registration Id from the DB and send me message to the correct device (Based on the registration id). here is the way i used it. I have an logistics app where in the Admin decide the take a load or do a refresh upon receving the GCM Message. The server db is having a GCM table with the following structure. RegistrationID | DriverId | Message | Status|. xxx | 2113 | Refresh | 1 The data will be pulled by the HTTP request which inturn send the message to the device so that Driver get to know that there is a updated data and it requires to download after downloading the data the APK will update the status back to 3 so that the HTTP request should not pull the same record. On Tue, Jul 8, 2014 at 11:09 PM, MS ms.jackspar...@gmail.com wrote: Hi Harri Smatt, Sender Id needs to be in the App to register with GCM server and get the GCM ID. I believe you are referring to GCM API key. We will be encrypting the GCM API Key in our app. On top of that we will be using DexGuard to obfuscate the code. And more over sending message to GCM is an *HTTPS *call. Considering all the above, we think that it should be secure enough. Thanks a lot for your reply. Do you foresee any other issues? Varun On Tuesday, 8 July 2014 22:24:17 UTC+5:30, Harri Smatt wrote: On 7 Jul 2014, at 16:38, MS ms.jack...@gmail.com wrote: Are we missing anything by not choosing to push via our own server? Is following such an implementation correct? Guess it works - but isn’t it any concern to you that you need to bundle your Sender Id, usually stored only on 3rd party application server, within the application? And, well, can’t tell how Google reacts once their GCM server gets hammered from millions, if not trillions, different IPs with your Sender Id. — H -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)
Further to that. . as soon the APK register the device it gets the RegistrationId which inturn store in the Server DB so that the Server can push the messsage. for example; https://myserver/api/updategcmdata driverid=2113 registrationid=x The service will update/create the new record in the DB. On Wed, Jul 9, 2014 at 12:55 PM, Mukesh Srivastav mukicha...@gmail.com wrote: @Haris.. You would need to store the GCM- Registration Id in the Database(Server side) so that the Server API/Webservice api/ should able to pick the Registration Id from the DB and send me message to the correct device (Based on the registration id). here is the way i used it. I have an logistics app where in the Admin decide the take a load or do a refresh upon receving the GCM Message. The server db is having a GCM table with the following structure. RegistrationID | DriverId | Message | Status|. xxx | 2113 | Refresh | 1 The data will be pulled by the HTTP request which inturn send the message to the device so that Driver get to know that there is a updated data and it requires to download after downloading the data the APK will update the status back to 3 so that the HTTP request should not pull the same record. On Tue, Jul 8, 2014 at 11:09 PM, MS ms.jackspar...@gmail.com wrote: Hi Harri Smatt, Sender Id needs to be in the App to register with GCM server and get the GCM ID. I believe you are referring to GCM API key. We will be encrypting the GCM API Key in our app. On top of that we will be using DexGuard to obfuscate the code. And more over sending message to GCM is an *HTTPS *call. Considering all the above, we think that it should be secure enough. Thanks a lot for your reply. Do you foresee any other issues? Varun On Tuesday, 8 July 2014 22:24:17 UTC+5:30, Harri Smatt wrote: On 7 Jul 2014, at 16:38, MS ms.jack...@gmail.com wrote: Are we missing anything by not choosing to push via our own server? Is following such an implementation correct? Guess it works - but isn’t it any concern to you that you need to bundle your Sender Id, usually stored only on 3rd party application server, within the application? And, well, can’t tell how Google reacts once their GCM server gets hammered from millions, if not trillions, different IPs with your Sender Id. — H -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Compass Reading - proper implementation.
On Monday, March 17, 2014 4:40:21 PM UTC-7, Nathan wrote: Last time I worked on a compass reading (which was years ago), I did something like this. A: http://www.javacodegeeks.com/2013/09/android-compass-code-example.html Of course, this example has a locked portrait orientation. So, I call something like this to get it in sync. http://developer.android.com/reference/android/view/Display.html#getRotation() Now, I realize that some of the calls in example A are deprecated. Many devices with which I am familiar, though, it actually does work. That's why, if I were to do a new implementation today, I might consider something like implementation B. B: http://sunil-android.blogspot.com/2013/02/create-our-android-compass.html I have no good way of testing either method on all of today's gazillion Android devices, so I am going to have to use a best practice, and try to blame the user's device when they don't work. So my questions are: 1. Does implementation B already take into account landscape/portrait orientation of the device, or should I continue to use Display.getRotation? 2. Are there known devices for which A fails and B works or vice versa? 3. Are there devices with usable sensors for which neither A or B works? 4. Are there any known drawbacks of implementation B? Nathan To follow up with my question from a several months ago. I can confirm that the deprectated Orientation sensor method (method A above) is broken in some devices. Not just wrong values - no values apparently. Two users at once told me they were getting no compass readings. When two users at once do that, I can expect the problem will soon be widespread. Xperia M2, and Samsung S4 mini. A log file from one showed this: 07-08 21:39:35.103 E/SensorManager(15370): sensor or listener is null I had both implementations in the code, but never really activated method B because of no real testing. I sent custom apk to one of the users, and method B worked. Both method A and method B work on the Galaxy note 3, which I have. Method B is much more jittery, and I expect that is the case in all devices. Don't know how to resolve that yet, and haven't seen gimbal lock yet to comment. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)
Yes, I believe we are talking about the same key (I did only a brief check on GCM documentation and thought it's called Sender Id, my bad). Still, I am not exactly sure how Google reacts if/once you start sending push notifications from multiple IPs. I tend to think people are usually limiting the IP space allowed to send notifications instead of depending on no filtering takes place at all. But if this is not an issue, I see absolutely no reason why this couldn't work. -- H On Jul 8, 2014 8:39 PM, MS ms.jackspar...@gmail.com wrote: Hi Harri Smatt, Sender Id needs to be in the App to register with GCM server and get the GCM ID. I believe you are referring to GCM API key. We will be encrypting the GCM API Key in our app. On top of that we will be using DexGuard to obfuscate the code. And more over sending message to GCM is an *HTTPS *call. Considering all the above, we think that it should be secure enough. Thanks a lot for your reply. Do you foresee any other issues? Varun On Tuesday, 8 July 2014 22:24:17 UTC+5:30, Harri Smatt wrote: On 7 Jul 2014, at 16:38, MS ms.jack...@gmail.com wrote: Are we missing anything by not choosing to push via our own server? Is following such an implementation correct? Guess it works - but isn’t it any concern to you that you need to bundle your Sender Id, usually stored only on 3rd party application server, within the application? And, well, can’t tell how Google reacts once their GCM server gets hammered from millions, if not trillions, different IPs with your Sender Id. — H -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] How to list my app as Wearable compatible?
On Tue, Jul 8, 2014 at 11:42 PM, Tung Mai Le choconlangth...@gmail.com wrote: I'm wondering how to list my app as wearable compatible, like in this list? https://play.google.com/store/apps/collection/promotion_30008f2_io_android_wear?hl=en It probably happens automatically based on your manifest, like Widgets. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: How to list my app as Wearable compatible?
On Tuesday, July 8, 2014 9:55:27 PM UTC-7, Tommy wrote: Hi, I'm wondering how to list my app as wearable compatible, like in this list? https://play.google.com/store/apps/collection/promotion_30008f2_io_android_wear?hl=en That looks like a handpicked list of featured apps, so the real question may be how you get the attention of the Google Play Marketing team. I don't know the answer. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: App memory vs extornal memory
any suggestions?? On Tue, Jul 8, 2014 at 3:56 PM, Rahul Kaushik rahulkaushi...@gmail.com wrote: In my app i need to install files(Html) from the server,i want to save it unzip it and show in my webview what could be the best possible place to download save and unzip the file App Internal memory or External Memory of phone Please Suggest Thanks Rahul Kaushik -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: App memory vs extornal memory
Create a folder on external memory card from application and store those files there. From that location you can access them. If you store them in app memory, then it will increase app size and may through OutOfMemory exception. On Jul 10, 2014 10:10 AM, Rahul Kaushik rahulkaushi...@gmail.com wrote: any suggestions?? On Tue, Jul 8, 2014 at 3:56 PM, Rahul Kaushik rahulkaushi...@gmail.com wrote: In my app i need to install files(Html) from the server,i want to save it unzip it and show in my webview what could be the best possible place to download save and unzip the file App Internal memory or External Memory of phone Please Suggest Thanks Rahul Kaushik -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.