tag:blogger.com,1999:blog-8371221544034078032.post4167912734352913100..comments2023-11-09T02:44:22.318-08:00Comments on Fun2Code: Setting up a Cloud Print Printer using the Cloud-X APIJochenhttp://www.blogger.com/profile/00094449484000593959noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-8371221544034078032.post-72739944431541591692016-04-29T04:07:15.801-07:002016-04-29T04:07:15.801-07:00Here is the link to the JAR: https://goo.gl/0oNaAP...Here is the link to the JAR: https://goo.gl/0oNaAP<br />But it's no longer working properly, Google has changed the API.<br />Jochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-15569404869452053202016-04-29T03:55:17.203-07:002016-04-29T03:55:17.203-07:00Hello can i get that jar file. I searched everywhe...Hello can i get that jar file. I searched everywhere but did not find any where.umesh polhttps://www.blogger.com/profile/10940676487962539633noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-49250261774907155802013-12-13T03:12:55.317-08:002013-12-13T03:12:55.317-08:00Good that it's working :)Good that it's working :)Jochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-34153869599119059192013-12-13T03:00:51.063-08:002013-12-13T03:00:51.063-08:00Hi Jochen,
Thanks a lot. We have inc...Hi Jochen,<br /> Thanks a lot. We have included the source code you provided and deleted the httpclient, httpcore jars from the libs folder. Now the classes from the package - de.fun2code.google.cloudprint refers to httpclient, httpcore that are already present in android system libraries, hence there is no conflicting issue while obfuscating the build . Only httpmime jar is referred externally as it has additional classes that are not present in android libs. <br /> Now, the obfuscated build with print feature works as desired. Thanks a ton Jochen !!! :)<br />phttps://www.blogger.com/profile/02486764879463511481noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-87176351533213583442013-12-12T11:56:11.922-08:002013-12-12T11:56:11.922-08:00Hi,
I've uploaded the sources to Google Drive....Hi,<br />I've uploaded the sources to Google Drive.<br />You can pick them up here: https://drive.google.com/file/d/0B8T86cdxxvu-N04xZ2FST2N1azA/edit?usp=sharing<br /><br />Hope that helps...Jochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-79220489954932687192013-12-11T10:54:06.251-08:002013-12-11T10:54:06.251-08:00Hi Jochen , the build that included print feature ...Hi Jochen , the build that included print feature worked very fine for the production environment too...however , when thhe code obfuscation step was carried out , some warnings were found that did not let us obfuscate the code ... httpclient, httpcore , httpmime these jars that we included for print feature are also build in android ...so there seems to be conflict while obfuscation.....<br /><br /> -dontwarn org.apache.http.commons.** such type of line were added in proguard file .. it stopped giving warning & produced obfuscated apk ... but the communication failed to the our server because it required android's httpclient & somehow obfuscation takes http class from jar included & ignores android's httpclient ... (my assumption)<br /><br /> Pease guide me if you have any solution or if you know any links related . Just this obfuscation step & then no further problem !<br /><br />phttps://www.blogger.com/profile/02486764879463511481noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-26200842146574636612013-11-28T22:45:27.821-08:002013-11-28T22:45:27.821-08:00Alright thanx for the response :)Alright thanx for the response :)phttps://www.blogger.com/profile/02486764879463511481noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-58284667189186918762013-11-28T02:28:58.070-08:002013-11-28T02:28:58.070-08:00I haven't tested this in a production environm...I haven't tested this in a production environment, so I can't tell.<br />But I would guess that it's quite stable.Jochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-8995530908694776682013-11-28T00:59:33.007-08:002013-11-28T00:59:33.007-08:00Hi, yes I tried with the same method. The problem ...Hi, yes I tried with the same method. The problem was the SCOPE that I had used for obtaining token was scope=https://www.googleapis.com/auth/cloudprint as it was mentioned in https://developers.google.com/cloud-print/docs/devguide. It gave me the token but not the one expected by search API of this jar. When I changed the scope to "cloudprint" I got the right token as now it lists all the printers registered to the account.<br /><br />Also, I have a question,are there any known issues of using this jar. So far it worked fine for me. But if the jar is to be used for commercial purpose, will it be reliable in providing print feature.<br />phttps://www.blogger.com/profile/02486764879463511481noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-5034335007692725712013-11-27T07:48:42.282-08:002013-11-27T07:48:42.282-08:00Did you try this?
gcp.search(null, "ALL"...Did you try this?<br />gcp.search(null, "ALL");Jochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-80588963012413979522013-11-27T05:34:45.712-08:002013-11-27T05:34:45.712-08:00Modifying this line----
But NOW gcp.search() ret...Modifying this line---- <br />But NOW gcp.search() returns me null printers in the list although there are printers available for the avccount I am using. The same call earlier gave me the list of printers.phttps://www.blogger.com/profile/02486764879463511481noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-12923775339975640242013-11-27T05:33:10.049-08:002013-11-27T05:33:10.049-08:00Hi, I was able to print by putting all the Apache ...Hi, I was able to print by putting all the Apache jars in the libs folder (including the non-relevant ones. However, your comment helped me in discarding those). Thanks<br /><br />Now, I have another question -<br />Using -<br /> gcp.connect(username, password, "cloudprint",<br /> "Cloud Print Test Client", null); printing works.<br />However, I also tried using -<br />gcp.connect(oauthToken, null); <br />Earlier it worked for multiple times that I tried calling this API.<br />But gcp.search() returns me null printers in the list although there are printers available for the avccount I am using. <br /><br /> phttps://www.blogger.com/profile/02486764879463511481noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-41913577871878694852013-11-20T03:18:38.033-08:002013-11-20T03:18:38.033-08:00Try to put the following Apache jars to your build...Try to put the following Apache jars to your build path:<br />httpclient<br />httpcore<br />httpmimeJochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-19169793566107879682013-11-19T02:42:10.634-08:002013-11-19T02:42:10.634-08:00Hi ,
I am facing the same error-
java.lang.NoClas...Hi ,<br />I am facing the same error- <br />java.lang.NoClassDefFoundError: de.fun2code.google.cloudprint.CountingFileBody at de.fun2code.google.cloudprint.CloudPrintConnection.submit(CloudPrintConnection.java:1036)<br /><br />Could you please mention Anonymous, about how you fixed it ?<br /><br /><br />phttps://www.blogger.com/profile/02486764879463511481noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-53208988583927282752013-10-23T08:27:58.843-07:002013-10-23T08:27:58.843-07:00Thanks, now it work fine.Thanks, now it work fine.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-40872834003089980372013-10-22T10:13:36.343-07:002013-10-22T10:13:36.343-07:00If you like, you can send me your code by mail: jo...If you like, you can send me your code by mail: jochen [at] fun2code.deJochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-66919411890084482962013-10-22T10:08:53.664-07:002013-10-22T10:08:53.664-07:00yes, i have the latest gcp.jar, and i saw the Coun...yes, i have the latest gcp.jar, and i saw the CountingFileBody.class is included in the jar file.<br />I don't know what's happend...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-47350820239150387412013-10-22T06:45:40.909-07:002013-10-22T06:45:40.909-07:00Just tried with the current gcp.jar, worked fine w...Just tried with the current gcp.jar, worked fine with a JRE.<br />I re-checked and the class CountingFileBody is included in that jar file.<br />Do you have the latest gcp.jar?Jochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-5604080613888253322013-10-19T01:33:04.915-07:002013-10-19T01:33:04.915-07:00I'll check. May take a while...I'll check. May take a while...Jochenhttps://www.blogger.com/profile/00094449484000593959noreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-67421012554893372262013-10-18T09:48:49.388-07:002013-10-18T09:48:49.388-07:00I tried your library in Android, the methods conne...I tried your library in Android, the methods connect and search work fine, but submit method fail :<br />java.lang.NoClassDefFoundError: de.fun2code.google.cloudprint.CountingFileBody at de.fun2code.google.cloudprint.CloudPrintConnection.submit(CloudPrintConnection.java:1036)<br /><br />Can you help me?<br /><br />Thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8371221544034078032.post-11251611006479796712012-11-04T01:16:01.320-08:002012-11-04T01:16:01.320-08:00Some API writers are expected to generate UML (Uni...Some API writers are expected to generate UML (Unified Modeling Language) diagrams as well. That's why advanced knowledge of such diagramming and flowcharting tools as MS Visio comes in handy.<br /><br /><a href="http://www.headhuntable.com/j/apis-jobs" rel="nofollow">apis jobs</a>alfredhttps://www.blogger.com/profile/01349478311612577696noreply@blogger.com