[android-developers] C2DM Server with PHP 401 Error

2011-02-11 Thread nino
I'm building my own C2DM application right now. I first started with a
small Android application to test the push feature. And it works if I
just call the curl command with the correct settings in my shell.

Now for the server part I wanted to use PHP but as it seems I'm doing
something wrong as I always get a 401 error message when I try to send
a message to the client. First of all the code consists of two parts.
The first curl request asks for the server token. This works I get a
real response from google with a working token!

The second curl request ends up with a 401 error message. Any ideas
what I'm doing wrong?

  $post_params = array ( "Email" => $MY_GOOGLE_ACC, "Passwd" =>
$MY_GOOGLE_PWD, "accountType"=>"GOOGLE", "source=" . $MY_GOOGLE_SRC,
"service=ac2dm" );

  $first = true;
  $data_msg = "";

  foreach ($post_params as $key => $value) {
if ($first)
  $first = false;
else
  $data_msg .= "&";

$data_msg .= urlencode($key) ."=". urlencode($value);
  }

  $x = curl_init("https://www.google.com/accounts/ClientLogin";);

  curl_setopt($x, CURLOPT_HEADER, 1);
  curl_setopt($x, CURLOPT_POST, 1);
  curl_setopt($x, CURLOPT_POSTFIELDS, $data_msg);
  curl_setopt($x, CURLOPT_RETURNTRANSFER, 1);
  $data = curl_exec($x);
  curl_close($x);
  $response = $data;

  $authKey = trim(substr($response, 4+strpos($response, "SID=")));

  echo $authKey;
  $collapse_key = 'something';

  $post_params = array ( "registration_id" => $DEVICE_TOKEN,
"collapse_key" => $collapse_key, "data.payload"=>"cakephp" );

  $first = true;
  $data_msg = "";

-- 
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


[android-developers] C2DMBroadcastReceiver in Activity

2011-04-15 Thread nino
I have an application that uses C2DM notifications. I'm pretty new to
Android development because I think my problem is actually quite
simple and I just don't know how the android architecture works so
here it goes, I hope you guys can help.

What I did basically is copy the classes C2DMBaseReceiver,
C2DMBroadcastReceiver and C2DMMessaging from the chrometophone
project. I then created a C2DMReceiver extends C2DMBaseReceiver and
created the override events. The onMessage event works, as I added a
log entry to output the data I push to the device. Now I have an
activity and would like to pop up an alert box from the (already
opened) activity, as soon as a message is pushed to my device. I'm
really lost here, as I can't figure it out.

Google and many different forums/mailing lists are suggesting me to
initiate a BroadCastReceiver in the activity and override the
onReceive method. The problem is that the C2DMBroadcastReceiver has
declared the onReceive method as final, so there is no way to
overwrite it. So I started to think, that this is not the right way to
go...

I found some other example, telling me to send a broadcast from my
C2DMReceiver and watch this from my Activity, I think this sounds
reasonable, but I have no idea how to implement it.. Does anyone of
you have some examples on how to get started here?

-- 
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


[android-developers] SocketException: Bad file number

2011-05-11 Thread nino
I get a "SocketException: Bad file number" whenever I try to use a
BufferedReader on a HttpResponse. Basically I try to parse my response
from the server. The strange thing is, that it only happens on my LG
2x (Android 2.2.2), I don't get this error on the Android Emulator
(Google 2.2) and on a HTC (2.2).

In this thread (http://stackoverflow.com/questions/5609688/android-
what-is-a-bad-file-number-socketexception) someone explained why the
error occurs. But why is the problem only happening on the LG phone,
and more importantly, how can I solve it?

-- 
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


[android-developers] Global touch events listener

2009-03-28 Thread el Nino

What I want to achieve is either to register a system-wide touch
listener service or draw a window to capture touch events , handle
them and dispatch to the underlying windows.
Is there a way to forward a touch event to the underlying window, say,
if the top window is transparent ?
Something like FLAG_NOT_TOUCH_MODAL in WindowManager.LayoutParams but
when the window is fullscreen.

Thanks

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Global touch events listener

2009-04-02 Thread el Nino

Anybody ?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Google Play Developer Console, An unexpected error occurred. Please try again later. (4800000)

2016-08-17 Thread 'Alex Nino' via Android Developers
Hi,

I have reached my highest limit of desperation trying to find out why my 
app Google Play integration stopped working out of the sudden. I do 
appreciate any help, ideas, suggestions you might have.

My app (which is a game) published in 2013 has been up and running without 
any problems until now, basically I uploaded (for the very first time) a 
new APK to the Beta testing section and somehow something got broken in the 
production version, What I mean by broken is that if I navigate to Game 
Services > My Game > Game Details, the page shows me a red top bar error.

An unexpected error occurred. Please try again later. (480)

if I try to navigate to Game Services > My Game > Linked apps (and add a 
new one) it shows me a similar error, red top bar.

An unexpected error occurred. Please try again later. (484)

also, navigating to Settings > API access will show the error.

An unexpected error occurred. Please try again later. (480)

Regarding these error messages I have already contacted Google via email, 
and unfortunately I haven't got any answer from them, I have no idea what 
else I can do, since August 11th none of my players are able to login using 
Google Play from the game (they lost their progress). It feels like the 
google backend is broken, and sadly it was my game what got heavily 
affected this time.

please let me know what your thoughts are, any ideas?

>From my client, when I try to login to Google Play, I am getting a very 
weird error:

*SIGN_IN_FAILED: *The Application is incorrectly configured. Check that the 
package name and signing certificate match the client ID created in the 
Developer Console. Also, if the application is not yet published, check 
that the account you're trying to sign in with is listed as a tester 
account. See logs for more information.*

and when I take a look at the LogCat events what I can see is:

.





















*08-18 00:19:33.490: W/GamesServiceBroker(3660): Client connected with SDK 
8487000, Services 9452438, and Games 3724003808-18 00:19:33.602: 
E/Volley(3660): [156] BasicNetwork.performRequest: Unexpected response code 
403 for https://www.googleapis.com/games/v1/players/me?language=en_GB 
08-18 
00:19:33.666: E/SignInIntentService(3660): Access Not Configured. Google 
Play Game Services API has not been used in project 608941808256 before or 
it is disabled. Enable it by visiting 
https://console.developers.google.com/apis/api/games/overview?project=608941808256
 

 
then retry. If you enabled this API recently, wait a few minutes for the 
action to propagate to our systems and retry.08-18 00:19:33.666: 
E/SignInIntentService(3660): 
com.google.android.gms.games.server.error.GamesException08-18 00:19:33.666: 
E/SignInIntentService(3660):  at 
com.google.android.gms.games.server.GamesServer.getResponseBlocking(GamesServer.java:174)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.games.server.api.PlayersApi.getBlocking(PlayersApi.java:86)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.games.broker.PlayerAgent.getPlayerFromNetwork(PlayerAgent.java:1638)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.games.broker.PlayerAgent.fetchPlayer(PlayerAgent.java:633)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.games.broker.DataBroker.loadSelf(DataBroker.java:1048)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.games.service.PlayGamesSignInIntentService$LoadSelfOperation.executeInternal(PlayGamesSignInIntentService.java:294)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.games.service.PlayGamesSignInIntentService$BaseOperation.execute(PlayGamesSignInIntentService.java:56)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.games.service.PlayGamesSignInIntentService$OperationAdapter.execute(PlayGamesSignInIntentService.java:520)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.chimera.BaseAsyncOperationService$OperationTask.run(BaseAsyncOperationService.java:177)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
com.google.android.gms.common.util.concurrent.PriorityRunnable.run(PriorityRunnable.java:17)08-18
 
00:19:33.666: E/SignInIntentService(3660):  at 
java.lang.Thread.run(Thread.java:818)08-18 00:19:33.682: 
E/LoadSelfFragment(21925): Unable to sign in - application does not have a 
registered client ID08-18 00:19:33.682: I/SignInActivity(21925): Transition 
from 8 to 1108-18 

[android-developers] Re: Google Play Developer Console, An unexpected error occurred. Please try again later. (4800000)

2016-08-17 Thread 'Alex Nino' via Android Developers
it's been a week already since all this problem started, here is an update 
from Google Play:


*Hi Alex,*





*Thanks for contacting Google Play Developer Support to report the behavior 
you're seeing when accessing game services. I’ve documented your issue and 
escalated it to our technical team for further investigation. Our team is 
working to resolve this issue for you as soon as possible.I appreciate your 
patience and I’ll let you know the moment I have an update. *



On Thursday, August 18, 2016 at 1:59:19 AM UTC+1, Alex Nino wrote:
>
> Hi,
>
> I have reached my highest limit of desperation trying to find out why my 
> app Google Play integration stopped working out of the sudden. I do 
> appreciate any help, ideas, suggestions you might have.
>
> My app (which is a game) published in 2013 has been up and running without 
> any problems until now, basically I uploaded (for the very first time) a 
> new APK to the Beta testing section and somehow something got broken in the 
> production version, What I mean by broken is that if I navigate to Game 
> Services > My Game > Game Details, the page shows me a red top bar error.
>
> An unexpected error occurred. Please try again later. (480)
>
> if I try to navigate to Game Services > My Game > Linked apps (and add a 
> new one) it shows me a similar error, red top bar.
>
> An unexpected error occurred. Please try again later. (484)
>
> also, navigating to Settings > API access will show the error.
>
> An unexpected error occurred. Please try again later. (480)
>
> Regarding these error messages I have already contacted Google via email, 
> and unfortunately I haven't got any answer from them, I have no idea what 
> else I can do, since August 11th none of my players are able to login using 
> Google Play from the game (they lost their progress). It feels like the 
> google backend is broken, and sadly it was my game what got heavily 
> affected this time.
>
> please let me know what your thoughts are, any ideas?
>
> From my client, when I try to login to Google Play, I am getting a very 
> weird error:
>
> *SIGN_IN_FAILED: *The Application is incorrectly configured. Check that 
> the package name and signing certificate match the client ID created in the 
> Developer Console. Also, if the application is not yet published, check 
> that the account you're trying to sign in with is listed as a tester 
> account. See logs for more information.*
>
> and when I take a look at the LogCat events what I can see is:
>
> .
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *08-18 00:19:33.490: W/GamesServiceBroker(3660): Client connected with SDK 
> 8487000, Services 9452438, and Games 3724003808-18 00:19:33.602: 
> E/Volley(3660): [156] BasicNetwork.performRequest: Unexpected response code 
> 403 for https://www.googleapis.com/games/v1/players/me?language=en_GB 
> <https://www.googleapis.com/games/v1/players/me?language=en_GB>08-18 
> 00:19:33.666: E/SignInIntentService(3660): Access Not Configured. Google 
> Play Game Services API has not been used in project 608941808256 before or 
> it is disabled. Enable it by visiting 
> https://console.developers.google.com/apis/api/games/overview?project=608941808256
>  
> <https://console.developers.google.com/apis/api/games/overview?project=608941808256>
>  
> then retry. If you enabled this API recently, wait a few minutes for the 
> action to propagate to our systems and retry.08-18 00:19:33.666: 
> E/SignInIntentService(3660): 
> com.google.android.gms.games.server.error.GamesException08-18 00:19:33.666: 
> E/SignInIntentService(3660):  at 
> com.google.android.gms.games.server.GamesServer.getResponseBlocking(GamesServer.java:174)08-18
>  
> 00:19:33.666: E/SignInIntentService(3660):  at 
> com.google.android.gms.games.server.api.PlayersApi.getBlocking(PlayersApi.java:86)08-18
>  
> 00:19:33.666: E/SignInIntentService(3660):  at 
> com.google.android.gms.games.broker.PlayerAgent.getPlayerFromNetwork(PlayerAgent.java:1638)08-18
>  
> 00:19:33.666: E/SignInIntentService(3660):  at 
> com.google.android.gms.games.broker.PlayerAgent.fetchPlayer(PlayerAgent.java:633)08-18
>  
> 00:19:33.666: E/SignInIntentService(3660):  at 
> com.google.android.gms.games.broker.DataBroker.loadSelf(DataBroker.java:1048)08-18
>  
> 00:19:33.666: E/SignInIntentService(3660):  at 
> com.google.android.gms.games.service.PlayGamesSignInIntentService$LoadSelfOperation.executeInternal(PlayGamesSignInIntentService.java:294)08-18
>  
> 00:19:33.666: E/SignInIntentService(3660):  at 
> com.google.android.gms.games.service.PlayGamesSignInIntentService$BaseOperation.execute(PlayGamesSi

[android-developers] Re: Google Play Developer Console, An unexpected error occurred. Please try again later. (4800000)

2016-08-19 Thread 'Alex Nino' via Android Developers
hi, thank you for your suggestion, I have already contacted Google Play 
thought different channels (i am still waiting for them to come with a 
solution), although it all feels related to google backend, i think it is 
important to have this document somewhere, when I google it I found out 
that I am not the only one having similar issues with the Developer Console 
(unexpected error...)

yesterday I also realised that that push notifications have stopped working 
too (again the game was up and working since 2013, and everything was 
working fine), it looks very related to this problem, when sending push 
notifications via gcm I am getting the following error:

Invalid Google Credentials

Google returned a 401 Unauthorized error. Your Google Server API Key is 
entered incorrectly, not enabled for Google Cloud Messaging, or 
access-restricted by IP.

On Thursday, August 18, 2016 at 7:34:11 AM UTC+1, Alex Nino wrote:
>
> it's been a week already since all this problem started, here is an update 
> from Google Play:
>
>
> *Hi Alex,*
>
>
>
>
>
> *Thanks for contacting Google Play Developer Support to report the 
> behavior you're seeing when accessing game services. I’ve documented your 
> issue and escalated it to our technical team for further investigation. Our 
> team is working to resolve this issue for you as soon as possible.I 
> appreciate your patience and I’ll let you know the moment I have an 
> update. *
>
>
>
> On Thursday, August 18, 2016 at 1:59:19 AM UTC+1, Alex Nino wrote:
>>
>> Hi,
>>
>> I have reached my highest limit of desperation trying to find out why my 
>> app Google Play integration stopped working out of the sudden. I do 
>> appreciate any help, ideas, suggestions you might have.
>>
>> My app (which is a game) published in 2013 has been up and running 
>> without any problems until now, basically I uploaded (for the very first 
>> time) a new APK to the Beta testing section and somehow something got 
>> broken in the production version, What I mean by broken is that if I 
>> navigate to Game Services > My Game > Game Details, the page shows me a red 
>> top bar error.
>>
>> An unexpected error occurred. Please try again later. (480)
>>
>> if I try to navigate to Game Services > My Game > Linked apps (and add a 
>> new one) it shows me a similar error, red top bar.
>>
>> An unexpected error occurred. Please try again later. (484)
>>
>> also, navigating to Settings > API access will show the error.
>>
>> An unexpected error occurred. Please try again later. (480)
>>
>> Regarding these error messages I have already contacted Google via email, 
>> and unfortunately I haven't got any answer from them, I have no idea what 
>> else I can do, since August 11th none of my players are able to login using 
>> Google Play from the game (they lost their progress). It feels like the 
>> google backend is broken, and sadly it was my game what got heavily 
>> affected this time.
>>
>> please let me know what your thoughts are, any ideas?
>>
>> From my client, when I try to login to Google Play, I am getting a very 
>> weird error:
>>
>> *SIGN_IN_FAILED: *The Application is incorrectly configured. Check that 
>> the package name and signing certificate match the client ID created in the 
>> Developer Console. Also, if the application is not yet published, check 
>> that the account you're trying to sign in with is listed as a tester 
>> account. See logs for more information.*
>>
>> and when I take a look at the LogCat events what I can see is:
>>
>> .
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *08-18 00:19:33.490: W/GamesServiceBroker(3660): Client connected with 
>> SDK 8487000, Services 9452438, and Games 3724003808-18 00:19:33.602: 
>> E/Volley(3660): [156] BasicNetwork.performRequest: Unexpected response code 
>> 403 for https://www.googleapis.com/games/v1/players/me?language=en_GB 
>> <https://www.googleapis.com/games/v1/players/me?language=en_GB>08-18 
>> 00:19:33.666: E/SignInIntentService(3660): Access Not Configured. Google 
>> Play Game Services API has not been used in project 608941808256 before or 
>> it is disabled. Enable it by visiting 
>> https://console.developers.google.com/apis/api/games/overview?project=608941808256
>>  
>> <https://console.developers.google.com/apis/api/games/overview?project=608941808256>
>>  
>> th