[android-developers] Re: Android Wear Ibeacon and Bluetooth

2016-02-28 Thread gjs
Hi,

Not sure if this helps you much, but I too have a Sony Smart Watch 3 and 
can confirm that it does indeed work ok with Bluetooth devices including 
Bluetooth Low Energy devices. I just tested my Sony Smart Watch 3 working 
ok with a TI Sensor tag B/LE device, eg reading the barometer sensor -

02-29 18:09:56.856 1737-1787/? D/BluetoothLEConnection: CALIBRATED 
BAROMETER = 1020.5832253894113

Source code for this is located here - http://git.ti.com/sensortag-android

Sorry can't help you with Beacons, maybe try these -

https://developers.google.com/beacons/

https://www.pubnub.com/blog/2015-04-14-building-android-beacon-android-ibeacon-tutorial-overview/

Regards

On Monday, February 29, 2016 at 8:40:52 AM UTC+11, Buğra Öztürk wrote:
>
> Me and my friends try to make a Android Wear app that will communicate 
> with Beacons. We have to provide bluetooth connection between our wear and 
> beacon in our program. But we have not found any information about Android 
> wear bluetooth connection code example or something else. If there is a any 
> informations you knew, pls tell me and rescue me this struggle. Our wear is 
> Sony Smart Watch 3 by the way. Thank you for now.
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/0171e7b8-6805-4631-bb31-d5eb6fe5c57a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Play Store doesnt recognize my app as Tablet ready

2016-02-28 Thread Steve Gabrilowitz
On Feb 28, 2016 3:33 PM,  wrote:
>
> Yes i have two screenshots there (minimum) Do you think that causes the
problem and not the config.xml?

Several things can cause that issue, including not having the proper screen
shots.  Maybe try posting your manifest file?

>
>
> Am Sonntag, 28. Februar 2016 21:07:04 UTC+1 schrieb Steve Gabrilowitz:
>
>> Did you upload tablet screen shots to the Play Store description?
>
>
>>
>> On Feb 28, 2016 1:14 PM,  wrote:
>>>
>>>
>>> Hey Community
>>>
>>> I have made an app for Android, but the Play Store doesnt think its
Tablet optimized. Its full responsive and looks good on all devices
(Tablet/Phone) i have tested. I have not used breakpoints. I have tried to
use diffrent android-minSdkVersion but that doesnt help. Do you guys have
an idea whats wrong?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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.
>>> To post to this group, send email to android-d...@googlegroups.com.
>>>
>>> Visit this group at https://groups.google.com/group/android-developers.
>>> To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/7857f475-2506-445b-8ee9-f0c57f3383e9%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an
email to android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/88955200-661b-440f-897a-6484bc37d683%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CABfabRjYV1TojzQqwVCecgbx0n7UguXO-Qdu9h9K-dooepTAyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android Wear Ibeacon and Bluetooth

2016-02-28 Thread Buğra Öztürk
Me and my friends try to make a Android Wear app that will communicate with 
Beacons. We have to provide bluetooth connection between our wear and 
beacon in our program. But we have not found any information about Android 
wear bluetooth connection code example or something else. If there is a any 
informations you knew, pls tell me and rescue me this struggle. Our wear is 
Sony Smart Watch 3 by the way. Thank you for now.

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/f82f10c9-0e45-4bae-840f-eec3ab2433a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Play Store doesnt recognize my app as Tablet ready

2016-02-28 Thread mu.huber
Actually i hope this is not causing the problem because its a simple game
for cats. It makes no sense to have a diffrent layout.

I have zero experience in making apps but i think the problem is somewhere
else, even if the apk (i have generated from mt html5/javascript/css
folder) works perfectly fine, installed directly on doffrent devices.

I have no other tests running on that apk other than on real devices.
Am 28.02.2016 10:28 nachm. schrieb "Kostya Vasilyev" :

> I think they have some sort of logic (behind the publishing console) to
> detect if your tablet screenshots are sufficiently different from phone
> screenshots.
>
> I once contacted Play support about it -- and they wrote back that my app
> doesn't look sufficiently different on tablets, so will not get the
> "optimized for tablets" in its listing.
>
> They wanted whole different layouts, not just bigger fonts or wider
> padding.
>
> So there is human moderation too, it seems.
>
> -- K
>
> 2016-02-28 23:34 GMT+03:00 :
>
>> I do not have made real screenshots of an 7" and an 10" tablet. I just
>> uploaded the same screenshot for both.
>>
>> Am Sonntag, 28. Februar 2016 21:32:11 UTC+1 schrieb mu.h...@gmail.com:
>>>
>>> Yes i have two screenshots there (minimum) Do you think that causes the
>>> problem and not the config.xml?
>>>
>>> Am Sonntag, 28. Februar 2016 21:07:04 UTC+1 schrieb Steve Gabrilowitz:
>>>
>>> Did you upload tablet screen shots to the Play Store description?

>>>
>>>
 On Feb 28, 2016 1:14 PM,  wrote:

>
> Hey Community
>
> I have made an app for Android, but the Play Store doesnt think its
> Tablet optimized. Its full responsive and looks good on all devices
> (Tablet/Phone) i have tested. I have not used breakpoints. I have tried to
> use diffrent android-minSdkVersion but that doesnt help. Do you guys have
> an idea whats wrong?
>
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/s764qbhvG2A/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/CAN7dqjBnkX_98V6ApzDmW2LzS0bgpWeiU0%2BkV41kRKjVL28VtA%40mail.gmail.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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAJS88pLvzDT77SmzxyBebNND3WOfBNSAX7vnzqi_Ef6kYb_9dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Play Store doesnt recognize my app as Tablet ready

2016-02-28 Thread Kostya Vasilyev
I think they have some sort of logic (behind the publishing console) to
detect if your tablet screenshots are sufficiently different from phone
screenshots.

I once contacted Play support about it -- and they wrote back that my app
doesn't look sufficiently different on tablets, so will not get the
"optimized for tablets" in its listing.

They wanted whole different layouts, not just bigger fonts or wider padding.

So there is human moderation too, it seems.

-- K

2016-02-28 23:34 GMT+03:00 :

> I do not have made real screenshots of an 7" and an 10" tablet. I just
> uploaded the same screenshot for both.
>
> Am Sonntag, 28. Februar 2016 21:32:11 UTC+1 schrieb mu.h...@gmail.com:
>>
>> Yes i have two screenshots there (minimum) Do you think that causes the
>> problem and not the config.xml?
>>
>> Am Sonntag, 28. Februar 2016 21:07:04 UTC+1 schrieb Steve Gabrilowitz:
>>
>> Did you upload tablet screen shots to the Play Store description?
>>>
>>
>>
>>> On Feb 28, 2016 1:14 PM,  wrote:
>>>

 Hey Community

 I have made an app for Android, but the Play Store doesnt think its
 Tablet optimized. Its full responsive and looks good on all devices
 (Tablet/Phone) i have tested. I have not used breakpoints. I have tried to
 use diffrent android-minSdkVersion but that doesnt help. Do you guys have
 an idea whats wrong?




-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAN7dqjBnkX_98V6ApzDmW2LzS0bgpWeiU0%2BkV41kRKjVL28VtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Play Store doesnt recognize my app as Tablet ready

2016-02-28 Thread mu . huber
I do not have made real screenshots of an 7" and an 10" tablet. I just 
uploaded the same screenshot for both. 

Am Sonntag, 28. Februar 2016 21:32:11 UTC+1 schrieb mu.h...@gmail.com:
>
> Yes i have two screenshots there (minimum) Do you think that causes the 
> problem and not the config.xml?
>
> Am Sonntag, 28. Februar 2016 21:07:04 UTC+1 schrieb Steve Gabrilowitz:
>
> Did you upload tablet screen shots to the Play Store description?
>>
>  
>
>> On Feb 28, 2016 1:14 PM,  wrote:
>>
>>>
>>> Hey Community 
>>>
>>> I have made an app for Android, but the Play Store doesnt think its 
>>> Tablet optimized. Its full responsive and looks good on all devices 
>>> (Tablet/Phone) i have tested. I have not used breakpoints. I have tried to 
>>> use diffrent android-minSdkVersion but that doesnt help. Do you guys have 
>>> an idea whats wrong?
>>>
>>>
>>>
>>>
>>>
>>> 
>>>
>>>
>>> 
>>>
>>>
>>>
>>> 
>>>
>>>
>>> -- 
>>> 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.
>>> To post to this group, send email to android-d...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/android-developers.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/android-developers/7857f475-2506-445b-8ee9-f0c57f3383e9%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1ecd-0e3b-43ba-9d8a-aa882df29f39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Play Store doesnt recognize my app as Tablet ready

2016-02-28 Thread mu . huber
Yes i have two screenshots there (minimum) Do you think that causes the 
problem and not the config.xml?

Am Sonntag, 28. Februar 2016 21:07:04 UTC+1 schrieb Steve Gabrilowitz:

Did you upload tablet screen shots to the Play Store description?
>
 

> On Feb 28, 2016 1:14 PM,  wrote:
>
>>
>> Hey Community 
>>
>> I have made an app for Android, but the Play Store doesnt think its 
>> Tablet optimized. Its full responsive and looks good on all devices 
>> (Tablet/Phone) i have tested. I have not used breakpoints. I have tried to 
>> use diffrent android-minSdkVersion but that doesnt help. Do you guys have 
>> an idea whats wrong?
>>
>>
>>
>>
>>
>> 
>>
>>
>> 
>>
>>
>>
>> 
>>
>>
>> -- 
>> 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 .
>> To post to this group, send email to android-d...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/android-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-developers/7857f475-2506-445b-8ee9-f0c57f3383e9%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/88955200-661b-440f-897a-6484bc37d683%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Play Store doesnt recognize my app as Tablet ready

2016-02-28 Thread Steve Gabrilowitz
Did you upload tablet screen shots to the Play Store description?
On Feb 28, 2016 1:14 PM,  wrote:

>
> Hey Community
>
> I have made an app for Android, but the Play Store doesnt think its Tablet
> optimized. Its full responsive and looks good on all devices (Tablet/Phone)
> i have tested. I have not used breakpoints. I have tried to use diffrent
> android-minSdkVersion but that doesnt help. Do you guys have an idea whats
> wrong?
>
>
>
>
>
> 
>
>
> 
>
>
>
> 
>
>
> --
> 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.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/7857f475-2506-445b-8ee9-f0c57f3383e9%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CABfabRjEw%3D29S%2BBCLUfJZwuMiHCoXhNCcXZnggmYzoJ6uunHEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] AdMob Child Treatment not working

2016-02-28 Thread Dino Velić
Hello,

I've published my game for children on 11th of February.

I've flagged my AdMob in code with tagForChildDirectedTreatment, but users 
are still seeing other inappropriate ads, like dating ads.

I can't find any contact info of Admob. Is there anything I can do?

I'm a bit embarassed by this problem, because I wouldn't want my child to 
see anything inappropriate, let alone somebody else's child.

Dino

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/e1e80848-c160-41b4-9200-0a2733b1f205%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] AdMob Child Treatment now working

2016-02-28 Thread Dino Velić
Hello,

I've published my game for children on 11th of February.

I've flagged my AdMob in code with tagForChildDirectedTreatment, but users 
are still seeing other inappropriate ads, like dating ads.

I can't find any contact info of Admob. Is there anything I can do?

I'm a bit embarassed by this problem, because I wouldn't want my child to 
see anything inappropriate, let alone somebody else's child.

Dino

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/f2220bf1-43bb-4bc5-a750-cbedac9e2971%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Play Store doesnt recognize my app as Tablet ready

2016-02-28 Thread mu . huber



Hey Community 

I have made an app for Android, but the Play Store doesnt think its Tablet 
optimized. Its full responsive and looks good on all devices (Tablet/Phone) 
i have tested. I have not used breakpoints. I have tried to use diffrent 
android-minSdkVersion but that doesnt help. Do you guys have an idea whats 
wrong?












-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/7857f475-2506-445b-8ee9-f0c57f3383e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] language of IDE android Studio

2016-02-28 Thread Ignacio O
I update windows 8 to windows 10 an my IDE now have a diferente languaje in 
menus, idont now how change, add an image.





HELP ME!

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/d400e3c8-4b74-419a-bd18-ae69dfc5ae02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Client / Server Style Android App

2016-02-28 Thread Cowboy1Brian .
Thank you Gary. I look forward to diving into this.

On Sun, Feb 28, 2016 at 12:36 AM, gjs  wrote:

> Hi
>
> Try
> https://cloud.google.com/solutions/mobile/appengine-endpoints-mobile-app
>
> Regards
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/FVxw47slrAk/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/ddf9a752-64f0-4cb5-9395-316c5c262f3c%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CA%2BX2UCy9i8P_AmNFGzBbmV9pybzaZNavGp-S1vhL69AUkLUCaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] I can go to company car brand Logo (Press) section - find a logo and put in Home Page.

2016-02-28 Thread Leonidas Savvides
A Used Car Company that handles many brands of cars asked my Mobile 
Development Office to develop for them,... 10 top brand cars Apps, one App 
per car brand...

About usage of Car brand logos eg BMW Logo

I can go to company car brand Logo (Press) section - find a logo and put in 
Home Page... this with stating clearly in App title and H1 titles that App 
is About BMW Used Cars...?

This I cannot do is find a logo from Google Images even logo states only 
the brand - and is the same as above... logo from Press office of brand?

*these are correct 1st-can , 2nd-cannot...???*

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/eb37f3eb-37f2-4761-8dab-b9cfd23d134f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Advice

2016-02-28 Thread Zakaria Zouitni
Thnks  you so much Shane Carr, thats look greet (y)


>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1491ca20-8395-43cc-b764-ebec923fd885%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Admob transition/animation

2016-02-28 Thread Ken Tavin
Hello fellow developers!


I am trying to integrate Admob interstitials/pop ups into a Corona SDK 
game. Does anyone know how to scroll or animate the adMob interstitial 
itself. For instance, when the adMob interstitial is called, rather than 
popping up directly onto the 
phone screen, it slides in/scrolls in from the bottom and then up to fill 
the entire screen? I've tried searching through online for any official 
documentation but have had no luck.

Any help would be much appreciated.

Thanks aplenty

Ken

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c7418a5b-41a6-4a75-a2aa-481ee12f409a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to implement sendRegistrationToServer “Android”?

2016-02-28 Thread Ezequiel R. Zorzal
I'm trying to implement the GCM service in my application, but I'm having 
trouble sending the TOKEN to my server.
Please help me with this problem. Even in my class does not print logs in 
my logcat. However, when I run the app it generates the following:


02-26 11:32:29.684 11399-11537/mycompany I/b: Sending API token request.
02-26 11:32:30.025 11399-11537/mycompany I/b: Received API Token: 
AH0uPGGC ... zZfMp / Expires in: 43200ms
02-26 11:32:30.034 11399-11537/mycompany I/g: Saved auth token


I want to take this token and send it to my server.
Thank you!
See my code below:

*AndroidManifest.xml*

...










...

 

















...


*MyGcmListenerService.java*

...

public class MyGcmListenerService extends GcmListenerService {

private static final String TAG = "MyGcmListenerService";


/**
 * Called when message is received.
 *
 *
 * @param from SenderID of the sender.
 * @param data Data bundle containing message data as key/value 
pairs.
 * For Set of keys use data.keySet().
 */
// [START receive_message]
@Override
public void onMessageReceived(String from, Bundle data) {
String message = data.getString("message");
Log.d(TAG, "From: " + from);
Log.d(TAG, "Message: " + message);

if (from.startsWith("/topics/")) {
// message received from some topic.
} else {
// normal downstream message.
}

// [START_EXCLUDE]
/**
 * Production applications would usually process the message 
here.
 * Eg: - Syncing with server.
 * - Store message in local database.
 * - Update UI.
 */

/**
 * In some cases it may be useful to show a notification 
indicating to the user
 * that a message was received.
 */
sendNotification(message);
// [END_EXCLUDE]
}
// [END receive_message]

/**
 * Create and show a simple notification containing the received 
GCM message.
 *
 * @param message GCM message received.
 */
private void sendNotification(String message) {
Intent intent = new Intent(this, MapActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* 
Request code */, intent,
PendingIntent.FLAG_ONE_SHOT);

Bitmap bm = BitmapFactory.decodeResource(getResources(), R.
drawable.icone);

Uri defaultSoundUri = RingtoneManager.getDefaultUri(
RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new 
NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.icone2)
.setLargeIcon(bm)
.setContentTitle("Title")
.setContentText(message)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);
   
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.
NOTIFICATION_SERVICE);

notificationManager.notify(0 /* ID of notification */, 
notificationBuilder.build());
}
}




*MyInstanceIDListenerService.java*



public class MyInstanceIDListenerService extends 
InstanceIDListenerService {

private static final String TAG = "MyInstanceIDLS";

/**
 * Called if InstanceID token is updated. This may occur if the 
security of
 * the previous token had been compromised. This call is initiated 
by the
 * InstanceID provider.
 */
// [START refresh_token]
@Override
public void onTokenRefresh() {
// Fetch updated Instance ID token and notify our app's server 
of any changes (if applicable).
Intent intent = new Intent(this, RegistrationIntentService.class
);
startService(intent);
}
// [END refresh_token]   
}


*QuickstartPreferences.java*


public class QuickstartPreferences {

public static final String SENT_TOKEN_TO_SERVER = 
"sentTokenToServer";
public static final String REGISTRATION_COMPLETE = 
"registrationComplete";

}


*RegistrationIntentService.java*


public class RegistrationIntentService extends