Skip to content Skip to sidebar Skip to footer

How Can I Create And Start An Intent?

I was wondering how I can create and start an intent using this: 'qsrtech.posprintdriver/.printservice' I downloaded the POS Printer Driver (ESC) app (which is the app I am trying

Solution 1:

You can try with this :

IntentsendIntent=newIntent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra("Data", "Test printer\n\n");
sendIntent.setComponent(newComponentName("qsrtech.posprintdriver","qsrtech.posprintdriver.printservice"));
startService(sendIntent);

Solution 2:

IntentsendIntent=newIntent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra("Data", "Test printer\n\n");
sendIntent.setComponent(newComponentName("qsrtech.posprintdriver","qsrtech.posprintdriver.printservice"));
startService(sendIntent); 

Worked like a charm here.

Post a Comment for "How Can I Create And Start An Intent?"