Android Studio: Can not resolve symbol 'setJobName'

7 posts / 0 new
Last post
Author
Message
sonaissi
Posted: 23 January 2018 - 9:18am
Android Studio: Can not resolve symbol 'setJobName'

Hello,

This is my first trying using this SDK.

I am trying to print an existing PDF document using an HP LasetJet M605m.

 

My app already generates the PDF and saves it in /storage/emulated/0/folder/filename.pdf

 

I have added compile  'com.hp.mss:mobileprintsdk:v2.02.466' to my app gradle.

 

In the present_PQR.java activity file I decalred:

PDFAsset pdfAsset = new PDFAsset("/storage/emulated/0/folder/filename.pdf");

PrintItem printItemDefault = new PDFPrintItem(PrintItem.ScaleType.CENTER, pdfAsset);

PrintJobData printJobData = new PrintJobData(context, printItemDefault);

PrintJobData.setJobName("PQR");

Before I could continue, I am getting an error here. setJobName is in red.

 

I have imported all classes including com.hp.mss.hpprint.model.PrintJobData although it is in grey as if it is unused. 

 

I am not sure what I am dong wrong for the error to show.

 

Any help would be apprecaited!

Top
Author
Message
dennischen
Posted: 25 January 2018 - 1:21pm
Were you able to resolve this

Were you able to resolve this issue? Maybe try a gradle sync or a build clean?

Top
Author
Message
sonaissi
Posted: 25 January 2018 - 2:04pm
compiling com.hp.mss:mobileprintsdk:v2.02.466 is the problem

I was never able to resolve this.

 

I upgraded my gradle and my Android Studio and now I see that whenever I try to compile 'com.hp.mss:mobileprintsdk:v2.02.466' the pproject fails to build

I get an error in the debug/AndroidmManifest.xml about unknown element <receiver>. removing the compile line and all HP sdk related code solves the issue. So my guess is that the HP sdk does not sit well with Android Studio 3.0.1 and the latest gradle? 

 

I would love to see this resolved. If anyone can help that will be great!

 

Thanks!

Top
Author
Message
ankit.sodha123
Posted: 12 March 2019 - 5:13am
Same Problem I am also Facing

Looking for solutions

Top
Author
Message
TheSkipper
Posted: 12 March 2019 - 10:07am
Mobile Print SDK deprecated since Android Oreo

I am the editor of the HP Developers Portal. I have passed this question to our Mobile Print developers.

SDK IS DEPRECATED
HP created the Mobile Print SDK for Android developers who wanted to offer a print button in their app. However, the SDK has been deprecated since Android Oreo was released in August 2017. With Oreo, a Print Service was integrated into the OS, so HP's Mobile Print SDK was not needed. Please explain why you are still using the SDK.

Top
Author
Message
TheSkipper
Posted: 12 March 2019 - 10:07am
Mobile Print SDK deprecated since Android Oreo

I am the editor of the HP Developers Portal. I have passed this question to our Mobile Print developers.

SDK IS DEPRECATED
HP created the Mobile Print SDK for Android developers who wanted to offer a print button in their app. However, the SDK has been deprecated since Android Oreo was released in August 2017. With Oreo, a Print Service was integrated into the OS, so HP's Mobile Print SDK was not needed. Please explain why you are still using the SDK.

Top
Author
Message
TheSkipper
Posted: 12 March 2019 - 10:18am
Please move to in-OS Printing

You may continue to use our SDK for your apps including modification. However HP is no longer updating or maintaining the print SDK. The creators of the retired Mobile Print SDK direct you to the improved print experiences available natively in popular mobile OS platforms. 

Please find updated OS information here:

Top
Please login to comment