[Q] GCM XMPP getting SASLError during auth - Java for Android App Development

Hi,
i have strange problems using GCM service over xmpp
i just use the sample code provided bei Google here:
developer.android.com/google/gcm/ccs.html#implement
sometimes this code works fine, and i get the notification on my device
but sometime i just run into a SASLError:
Code:
SASL authentication PLAIN failed: text:
the cause for this error is, that Google GCM server returned an error:
Code:
text
which is unknown in the smack SASLError enum.
so first i don't know what the root cause is.
when i run this code in a loop, i can see that for n request in a row i receive this error, then after some time, the error is gone and messages are send.
again after some time, i receive the error again.
couldn't explain why,
could it be that there are some Google Servers not working properly ?
when i use the test url:
Code:
gcm-preprod.googleapis.com:5236
at least i don't get the SASLError, instead i just get not-authorized.
but the behavior is the same, n requests works n next requests doesn't
did someone have any idea why this happens ? or having the same problems ?
thanks a lot

Related

HTC Stocks currency problem

The HTC Stocks app has the best widget of all other currency apps, so I was using it on my 1.5 Hero for displaying the EURO/GBP (EURGBP=X) rate.
After the 2.1 rom update I have a strange problem. When I try to add a new ticker for "eurgbp=x", I get the error message: "Unable to recognize the company name or stock symbol you typed. Please try again." However, this worked in the past like a charm. I have to note that adding "gbp=x" or "usd=x" works fine, with no problem at all.
Maybe this problem is related to an updated version of the Stocks app in the new rom. Is anyone experiencing the same problem? I haven't found a similar thread for a Sense Android phone. The same problem exists in the latest rom of HD2, but people have figured a work-around, by changing a file under "Application Data\HTC\", but this file doesn't exist on Android.
Any help would be more than welcome!
I experience the same problem (although I'm on VillainRom12). Previously adding currencies (EURUSD=X etc) was working, but right now I am unable to find it. This could be HTC problem as it was working fine on 1.5, but this could be also some Yahoo search glitch (I am unable to search for that quotes on mobile version of the Yahoo Finance page, while the desktop version works fine). The only workaround to that was to edit manually SQLite database of Stocks application (but this may require root - I can provide details if necessary). Once I added appropriate entries to the list of stocks, it seems to be working fine (it is displaying my currencies, but the search still does not work).
One other deficiency I found was the fact that graphs are not cached anymore - If I open the application and check for example a daily graph, I need to update it in order to see any chart - each time, even if I switch from 1D to 5D and back. It is also automatically updated each time I visit given tab, if I enable the automatic updates. Previously this app displayed previously cached graph. I'm not sure whether this happens also on stock 2.1 ROM.
Now that you mention it, I have the same problem with the graphs in the 2.1, too. It worked (showed the cashed graph) in the 1.5, but not any more. Blank graph until it updates.
Can you provide me some guidance about how to edit the Stocks' database? At least a link to something similar would be much appreciated. Can I access the phone's system folder without rooting it, through my PC (Win, Linux, whatever)?
eeVoskos said:
Can you provide me some guidance about how to edit the Stocks' database? At least a link to something similar would be much appreciated. Can I access the phone's system folder without rooting it, through my PC (Win, Linux, whatever)?
Click to expand...
Click to collapse
I'm new in the business, so I'm not sure if the root is necessary. You can try it, anyway to see if you will be able to push and pull files from the directory where Stocks stores its database.
Here's what I did:
Enable USB Debugging in Settings -> Applications -> Development -> USB Debugging
Download Android SDK from http://developer.android.com/sdk/index.html
In command line go to subdirectory tools of Android SDK
Close Stocks app and remove Stocks widget from the screen
Connect Phone via USB
... (Beginning of the optional part) ...
Go to Android shell
Code:
adb shell
List any processes to see if there's a com.htc.android.Stock process (like in this case)...
Code:
ps | grep Stock
7605 10007 130m S com.htc.android.Stock
7619 0 2156 S grep Stock
Kill any Stock processes (using the value in the first column):
Code:
kill 7605
Exit to command line
Code:
exit
... (End of the optional part) ...
Pull the Stock database:
Code:
adb pull /data/data/com.htc.dcs.service.stock/databases/stock.db stock.db
Sample output:
Code:
d:\Projects\Android\tools>adb pull /data/data/com.htc.dcs.service.stock/databases/stock.db stock.db
568 KB/s (5120 bytes in 0.008s)
Backup, just in case:
Code:
copy stock.db stock_backup.db
Run sqlite3
Code:
sqlite3 stock.db
Enable headers in sqlite:
Code:
.headers on
List contents of quotes table:
Code:
select * from quotes;
Sample output:
Code:
sqlite> select * from quotes;
_id|_name|_symbol|_price|_change|_percent|_open|_high|_low|_volume|_link|_type|_sequence|_updatetime
2|CHF/PLN|CHFPLN=X|3.08299994468689|0.0116999996826053|0.381900012493134|3.07209992408752|3.08550000190735|3.07010006904602|0|http://m.yahoo.com/htcwf/search?p=CHFPLN=X||0.0|1278490511305
3|USD/PLN|USDPLN=X|3.27649998664856|0.0200999993830919|0.617200016975403|3.25550007820129|3.27959990501404|3.24499988555908|0|http://m.yahoo.com/htcwf/search?p=USDPLN=X||100.0|1278490511305
4|EUR/PLN|EURPLN=X|4.1217999458313|0.0151000004261732|0.367700010538101|4.11250019073486|4.12349987030029|4.10799980163574|0|http://m.yahoo.com/htcwf/search?p=EURPLN=X||200.0|1278490511305
5|EUR/USD|EURUSD=X|1.25789999961853|-0.00469999993219972|-0.376199990510941|1.26170003414154|1.26259994506836|1.25689995288849|0|http://m.yahoo.com/htcwf/search?p=EURUSD=X||300.0|1278490511305
6|EUR/CHF|EURCHF=X|1.33689999580383|-0.000899999984540045|-0.0710000023245811|1.33879995346069|1.33910000324249|1.33609998226166|0|http://m.yahoo.com/htcwf/search?p=EURCHF=X||400.0|1278490511305
sqlite>
Note the last _id (here 6) and add new currency with _id higher by 1 (so here, 7):
Code:
insert into quotes (_id, _name, _symbol) values (7, "EUR/GBP", "EURGBP=X");
Check if it has been added:
Code:
select * from quotes;
Sample output:
Code:
sqlite> select * from quotes;
_id|_name|_symbol|_price|_change|_percent|_open|_high|_low|_volume|_link|_type|_sequence|_updatetime
2|CHF/PLN|CHFPLN=X|3.08299994468689|0.0116999996826053|0.381900012493134|3.07209992408752|3.08550000190735|3.07010006904602|0|http://m.yahoo.com/htcwf/search?p=CHFPLN=X||0.0|1278490511305
3|USD/PLN|USDPLN=X|3.27649998664856|0.0200999993830919|0.617200016975403|3.25550007820129|3.27959990501404|3.24499988555908|0|http://m.yahoo.com/htcwf/search?p=USDPLN=X||100.0|1278490511305
4|EUR/PLN|EURPLN=X|4.1217999458313|0.0151000004261732|0.367700010538101|4.11250019073486|4.12349987030029|4.10799980163574|0|http://m.yahoo.com/htcwf/search?p=EURPLN=X||200.0|1278490511305
5|EUR/USD|EURUSD=X|1.25789999961853|-0.00469999993219972|-0.376199990510941|1.26170003414154|1.26259994506836|1.25689995288849|0|http://m.yahoo.com/htcwf/search?p=EURUSD=X||300.0|1278490511305
6|EUR/CHF|EURCHF=X|1.33689999580383|-0.000899999984540045|-0.0710000023245811|1.33879995346069|1.33910000324249|1.33609998226166|0|http://m.yahoo.com/htcwf/search?p=EURCHF=X||400.0|1278490511305
7|EUR/GBP|EURGBP=X|||||||||||
sqlite>
Quit sqlite:
Code:
.quit
Push the file back to the phone:
Code:
adb push stock.db /data/data/com.htc.dcs.service.stock/databases/stock.db
Sample output:
Code:
d:\Projects\Android\tools>adb push stock.db /data/data/com.htc.dcs.service.stock/databases/stock.db
341 KB/s (5120 bytes in 0.014s)
Restart phone.
See if that worked
I hope HTC (or Yahoo) will be able to fix that, because the above is really a long process...
Anyway, I can't make it work. Entering "ps | grep Stock" gives me a "grep: permission denied" error message. I did some searching and I believe this is what people mean by saying "you need root access", right? I'll come back when I'm rooted (i.e. when I find a decent guide for rooting 2.1).
Thanks for your time & effort man. I really appreciate it.
eeVoskos said:
Anyway, I can't make it work. Entering "ps | grep Stock" gives me a "grep: permission denied" error message.
Click to expand...
Click to collapse
You can try to omit the "optional" part (steps 6-9) - the ps thing was just to make sure that Stock isn't running. But I noticed anyway that it never ran in the background when I closed it on the phone. Try to adb pull and adb push and see if you'll get any permission issues. If you do, then you indeed need a root (sorry I can't check that as I'm rooted)
A couple of days ago I updated the ROM of my HTC TD2, with the most recent one of HTC (WM6.5, Sense 2.5.20113030.0). Afterwards I noticed that I also could not get the stock app to accept the code EURUSD=X.
You mention the following
The same problem exists in the latest rom of HD2, but people have figured a work-around, by changing a file under "Application Data\HTC\", but this file doesn't exist on Android.
Click to expand...
Click to collapse
Can you tell me what that work-around is or point me to it? Hopefully this can help me.
Thank you in advance.
Check this thread:
http://forum.xda-developers.com/showthread.php?t=706732
eeVoskos said:
Check this thread:
Click to expand...
Click to collapse
Thank you for the link (which I am not allowed to repost ).
Last Monday I wrote an e-mail to HTC about this problem and a couple of days later I got a reply. They told me they tried to search for the currency rate (eurusd) and that they got a result. So I tried again and lo and behold I got a result as well. Searching for eurusd=x gave me a result while last weekend it was not working.
So I tried several other currency rates and they all rendered a result, also eurgbp=x. Perhaps it is also fixed for the Android app.
[Extra information added below]
Tried again and nothing
I was connected with a data connection to my carrier, so I switched to my wifi connection. Tried again and... result.
So it seems to be a difference in communication between an ordinary data connection and a wifi connection. Maybe this will help someone
Wird problem. I tried it too on both UK and Greek carriers and on WiFi, but nothing. No result for either of them: "eurgbp=x", "eurgbp", "eurusd=x", "eurusd". I have been trying occasioanly more than one month now.
I think I should drop them an email too...
Why don't you do a soft (temporary) root and make the database entries as described in here? I did it and now I got all the stuff I need, and no trace of root on the device.

Call to my website

Trying to run php script on my site.
If i put URL and name/value pair into a browser, the script runs and returns info from my database.
However, when I run HttpPost httppost = new HttpPost("http://www.mywebsite/myscript.php");
I get Unknown Host; this is most likely DNS and my namesevers should be getting setup.
So I put in the IP address of www.mywebsite..and it throws a Socket Exception, Permission Denied.
Any ideas? I tried adding android.permission.INTERNET on the Applications tab of Manifest.xml, but that gives me an error and won't even run the program.
Something like "l (pid=3228, uid=2000) requires android.permission.INTERNET" no idea what that's complaining about
Update to those that may encounter same problem....
Adding the permission via the Application tab wasn't correct. I manually added the line "<uses-permission android:name="android.permission.INTERNET" />" before the <application> tag in manifest.xml and it worked fine.
NOTE: I had tired that before and it still gave an error. I shut down my Mac Book Pro and restarted and it was ok...maybe a cache issue.

Cloud Setup tested servers

Hi. As seen on Defy forum, there is a custom setting on every Blurred device that allows access to the developer's servers to check if there is any leaked rom. I started testing today, if someone is willing to help, follow this post instructions: http://forum.xda-developers.com/showpost.php?p=15860504&postcount=65. This can be done on both stock ROM or Argen2Stone.
Tested servers up to now:
master-lab.blurdev.com - No updates
master-demo.blurdev.com - Not avaliable
master-dev.blurdev.com - No updates
master-qa1.blurdev.com - No updates
master-qa2.blurdev.com - No updates
master-qa3.blurdev.com - No updates
master-qa4.blurdev.com - No updates
master-staging1.blurdev.com - No updates
master-sdc1.svcmot.com - No updates
master-blur.svcmot.com - No updates
master-homer.blurdev.com - Error trying to register
master-bart.blurdev.com - Error trying to register
master-lisa.blurdev.com - Not avaliable
master-maggie.blurdev.com - Error trying to register
master-marge.blurdev.com - Not avaliable
master-bqa1.blurdev.com - Error trying to register
master-bqa2.blurdev.com - Error trying to register
testcloud01-sdc1.blurdev.com - No updates
Created on General section so anyone can help. Try different servers other than the ones posted here, so we can move faster.
Please test again the servers that returned errors.
These are the only servers that get listed. I too get "unable to register" error.
Did you test those servers on your M2, or this list is Defy's?
Sent from my Milestone 2 XDA App
On my M2
I thought it was more servers. Turns out I did it under a hour.
Rocking with my M2 and XDA app
I tested all servers from the list with no luck. I wasn't able to create accounts into some of the servers but I don't remember which.
Can someone please sniff the packets if the phone is on WiFi. I would like to see the packet structure and how it connects. Does it use SSL etc. I am at work right now but would like to take a look over them and do some work this weekend on these.

[Q] Encryption on P7000 not working?

Hi,
I wanted to turn on the standard encryption on my P7000 (to gain access to corporate exchange server and sync) but I have discovered a bug:
- encryption starts, black screen with android logo (no animation) and nothing happens even after hours (replace the battery to reboot the phone necessary).
- after reboot the phone is not encrypted (but also not broken, so seems to start and runs in an error before messing up partitions)
- power is connected,battery at 100%
- latest OTA image from 20150617 from elephone was applied automatically (Android 5.0)
- after a missed try I rooted the phone and gave it another try (with same result)
So I installed touchdown for the moment (can also access via activesync) to have a workaround but I would like to see this issue fixed.
Any hints or tipps what I cound try to fix it myself, or do I need to wait until Elephone might fix it with one f the next OTAs?
Best,
Peter
not sure if it helps i have p7000
hello. i have two exchange services email accounts on mine. it is non rooted just stock updated to 52915
i download the latest exchange mail services for gmail. i can provide link to see if it helps but i have active syncing on both exchange e mail addresses.
sorry if im off topic
Hi,
I have the same exact problem on the P8000.
For P7000, there is a post on the elephone forum, but no solution...
http://bbs.elephone.hk/thread-5858-1-1.html#.VckPfZM-IrQ
Same issue for me. Need to encrypt my phone. Even with the latest stock rom the encryption process is not working.
Tried with adb-logcat and found that there was an issue with the /data : "unmounting /data failed: Device or resource busy"
Looks like there is a fix for encryption on P7000:
http://bbs.elephone.hk/thread-7731-1-1.html#.VfbcMLM-I8N

Phone failed to setup, "device reset, please login with previous owner" and if I tried to fastboot recovery it's giving device write failed error

I was using m1 pro and did use some custom rom on it. I put the official image back and given to family member. My family member change email. I am trying to find account by number (2 account found not able to make it work with both).
I tried to reset multiple error but it's not moving ahead. I see Evolution 13 and pixelexperience 12.0. I have download both but when I am trying to make it work, it's failing with device write failed (unknown error).
Is there any option to make it work.
The device is fully functional. only issue is I am not able to set up it.
I found the solution. Using gboard I open the language set window in there I use a language which have multiple variant for me it's amrara something.
Later I search for marco and moved to chrome and in chrome I install the launcher. launcher make me able to use settings which help me to get my device working.
If anyone have trouble se these step

Categories

Resources