Java SDKని ఉపయోగించి బార్‌కోడ్ స్కానర్ యాప్‌ను ఎలా అభివృద్ధి చేయాలి. మీ వెబ్, మొబైల్ మరియు డెస్క్‌టాప్ అప్లికేషన్‌లలో QR స్కాన్ సామర్థ్యాలను అమలు చేయండి.

బార్‌కోడ్ స్కానర్

బార్‌కోడ్‌ని ఆన్‌లైన్‌లో స్కాన్ చేయండి | QR కోడ్ స్కానర్

ఈ కథనంలో, Java REST APIని ఉపయోగించి బార్‌కోడ్ స్కానర్ మరియు QR కోడ్ స్కానర్ యాప్‌ను ఎలా అభివృద్ధి చేయాలి అనే వివరాలను మేము చర్చించబోతున్నాము. నేటి వేగవంతమైన ఆర్థిక వ్యవస్థలలో, బార్‌కోడ్‌లు ఉత్పత్తి వివరాలను నిల్వ చేయడానికి విక్రేతలు మరియు వ్యాపారులకు అవసరమైన మరియు ఆచరణీయమైన పరిష్కారం అని మేము అర్థం చేసుకున్నాము. సంవత్సరాలుగా, వారు వ్యాపారాలకు విలువైన మరియు ఆచరణీయమైన ఎంపికగా నిరూపించబడ్డారు. వారు బాగా సామర్థ్యాన్ని మెరుగుపరిచారు మరియు ఓవర్‌హెడ్‌ను తగ్గించారు. బార్‌కోడ్‌లు ఖర్చుతో కూడుకున్నవి మరియు నమ్మదగినవి. బార్‌కోడ్‌ని ఉపయోగించడం వల్ల కలిగే ఇతర ప్రయోజనాలతో పాటు, దిగువ పేర్కొన్న వాటిని ఉపయోగించడం వల్ల మరికొన్ని ప్రయోజనాలు ఉన్నాయి

  • బార్‌కోడ్‌లు మానవ తప్పిదాల సంభావ్యతను తొలగిస్తాయి
  • బార్‌కోడ్ వ్యవస్థను ఉపయోగించడం వల్ల ఉద్యోగి శిక్షణ సమయం తగ్గుతుంది
  • బార్‌కోడ్‌లు చాలా బహుముఖంగా ఉంటాయి మరియు అవసరమైన డేటా సేకరణ కోసం ఉపయోగించవచ్చు
  • అవి ఖచ్చితమైన జాబితా నియంత్రణను ప్రారంభిస్తాయి మరియు అందువల్ల ఇన్వెంటరీ నియంత్రణ మెరుగుపడుతుంది
  • ఇంకా, బార్‌కోడ్‌లు మెరుగైన డేటాను అందిస్తాయి అంటే ఒకే బార్‌కోడ్ ఇన్వెంటరీ మరియు ధర వివరాలను అందించవచ్చు

అటువంటి అన్ని లక్షణాలకు సంబంధించినది, Aspose.BarCode Cloud Java SDK Java డెవలపర్‌లకు Java భాషను ఉపయోగించి బార్‌కోడ్‌ను ఆన్‌లైన్‌లో సృష్టించడానికి అలాగే స్కాన్ చేయడానికి అధికారం ఇస్తుంది. మా ఇతర క్లౌడ్ APIల మాదిరిగానే, Aspose.BarCode Cloud Java SDKకి మీరు క్లౌడ్ డ్యాష్‌బోర్డ్‌లో ఖాతాను నమోదు చేసుకోవడం అవసరం. మీరు ఇప్పటికే ఖాతాను నమోదు చేసి ఉంటే, మీరు దాన్ని ఉపయోగించడం కొనసాగించవచ్చు. మీరు మీ ఖాతాను సిద్ధం చేసిన తర్వాత, మీరు AppKey మరియు AppSID ద్వారా క్లౌడ్ సేవలను ఉపయోగించడం మంచిది.

మీరు Aspose Cloud నిల్వను ఉపయోగించడాన్ని పరిగణించవచ్చు లేదా, ఫైల్ నిల్వ మరియు తిరిగి పొందడం కోసం ఏదైనా మూడవ పక్ష క్లౌడ్ నిల్వ సేవలను ఉపయోగించవచ్చు.

మద్దతు ఉన్న బార్‌కోడ్ సింబాలాజీలు

EAN, UPC, Codabar, PDF417, QR, MicroQR, Postnet, Planet, RM4SCC మొదలైన అనేక బార్‌కోడ్ సింబాలజీలకు (60 కంటే ఎక్కువ) SDK మద్దతు ఇస్తుంది. మీరు ఇప్పటికే ఉన్న బార్‌కోడ్ సమాచారాన్ని లోడ్ చేసి, అవుట్‌పుట్‌ను పాపులర్ ఇమేజ్‌లో సేవ్ చేసే ఎంపికను కూడా పొందుతారు. JPEG, PNG, GIF, BMP, TIFF, EMF, [WMF][ వంటి ఫార్మాట్‌లు 9], SVG, EXIF మరియు ICON. మద్దతు ఉన్న సింబాలజీల పూర్తి జాబితా కోసం, దయచేసి Aspose.BarCode Cloud Java SDKని సందర్శించండి.

బార్‌కోడ్‌ని రూపొందించండి

SDK అనేక ఫార్మాట్‌లలో లీనియర్, 2D మరియు పోస్టల్ బార్‌కోడ్ చిత్రాలను సృష్టించడానికి మీకు అందిస్తుంది. మీరు చిత్రం వెడల్పు, ఎత్తు, సరిహద్దు శైలి మరియు అవుట్‌పుట్ చిత్ర ఆకృతి వంటి బార్‌కోడ్ చిత్ర లక్షణాలను పేర్కొనవచ్చు. మీరు మీ అప్లికేషన్ అవసరాలకు అనుగుణంగా బార్‌కోడ్ రకం మరియు టెక్స్ట్ లొకేషన్ మరియు ఫాంట్ స్టైల్స్ వంటి టెక్స్ట్ లక్షణాలను కూడా పేర్కొనవచ్చు. ఇది బార్‌ల ఎత్తును సెట్ చేయడానికి & బార్‌కోడ్ చిత్రాలను కోణంలో తిప్పడానికి సామర్థ్యాలను కూడా అందిస్తుంది.

కింది ఉదాహరణ కోడ్39స్టాండర్డ్ బార్‌కోడ్‌ను సృష్టించే దశలను చూపుతుంది, పేజీ యొక్క టాప్-సెంటర్ అమరికపై ఉంచబడింది. టెక్స్ట్ కలర్ నేవీ, క్షితిజ సమాంతరంగా పేర్కొనబడింది మరియు నిలువు రిజల్యూషన్ 200గా పేర్కొనబడింది. బార్‌కలర్ ఆరెంజ్‌గా పేర్కొనబడింది, బ్యాక్‌గ్రౌండ్ కలర్ సిల్వర్‌గా సెట్ చేయబడింది మరియు అవుట్‌పుట్ ఫార్మాట్ JPEG ఫార్మాట్.

మేము మరింత కొనసాగడానికి ముందు, CURL కమాండ్‌ని ఉపయోగించి APIని యాక్సెస్ చేస్తున్నప్పుడు JWT టోకెన్ అవసరం కాబట్టి ఈ క్రింది లింక్‌ని సందర్శించమని మేము మీకు సిఫార్సు చేస్తున్నాము.

వలయములుగా

curl -X PUT "https://api.aspose.cloud/v3.0/barcode/MySample.jpeg/generate?Type=Code39Standard&Text=BarCode%20processing&TextLocation=Above&TextAlignment=Center&TextColor=Navy&FontSizeMode=Auto&Resolution=200&ResolutionX=200&BackColor=silver&BarColor=Orange&BorderColor=Blue&format=jpeg" \
-H  "accept: application/json" \
-H  "authorization: Bearer <JWT Token>"

URLను అభ్యర్థించండి

https://api.aspose.cloud/v3.0/barcode/MySample.jpeg/generate?Type=Code39Standard&Text=BarCode%20processing&TextLocation=Above&TextAlignment=Center&TextColor=Navy&FontSizeMode=Auto&Resolution=200&ResolutionX=200&BackColor=silver&BarColor=Orange&BorderColor=Blue&format=jpeg

జావా

ApiClient client = new ApiClient(
"App SID from https://dashboard.aspose.cloud/#/apps",
"App Key from https://dashboard.aspose.cloud/#/apps");
		        
com.aspose.barcode.cloud.api.BarcodeApi api = new com.aspose.barcode.cloud.api.BarcodeApi(client);
String name = "MySample.jpeg";
String type = com.aspose.barcode.cloud.model.EncodeBarcodeType.CODE39STANDARD.getValue();	
String text = "Barcode processing API"; // String | Text to encode.
String twoDDisplayText = null;
String textLocation = com.aspose.barcode.cloud.model.CodeLocation.ABOVE.getValue();
String textAlignment = com.aspose.barcode.cloud.model.TextAlignment.CENTER.getValue();
String textColor = "Navy";
String fontSizeMode = com.aspose.barcode.cloud.model.FontMode.AUTO.getValue();
int resolution = 200;
double resolutionX = 200;
double resolutionY = 200;
String barColor = "Orange";
String format = "JPEG";
		        
try {
com.aspose.barcode.cloud.model.ResultImageInfo result = api.putBarcodeGenerateFile(
    name, 
		type, 
		text, 
		twoDDisplayText, 
		textLocation, 
		textAlignment, 
		textColor, 
		fontSizeMode, 
		(double) resolution, 
		resolutionX, 
		resolutionY, 
		null, 
		null, 
		null, 
		null, 
		null, 
		null, 
		null, 
		null, 
		"Silver", 
		barColor, 
		"Blue",
		null, 
		null, 
		true, 
		null, 
		null, 
		null, 
		null, 
		null, 
		null, 
		null, 
		null, 
		null, 
		null,
		format);
		            
  System.out.println(result);
	} catch (ApiException e) {
  System.err.println("Exception when calling BarcodeApi#PutBarcodeGenerateFile");
	e.printStackTrace();
}
ఆన్‌లైన్ బార్‌కోడ్ స్కానర్

చిత్రం 1:- ఫలితం బార్‌కోడ్ ప్రివ్యూ.

బార్‌కోడ్ రీడర్ ఆన్‌లైన్

QR స్కాన్

చిత్రం 2: QR కోడ్ స్కానర్

క్లౌడ్ API ఇప్పటికే ఉన్న బార్‌కోడ్‌ల నుండి సమాచారాన్ని కూడా గుర్తించగలదు. మీరు త్వరిత పునరుద్ధరణ కోసం బార్‌కోడ్ రకం వివరాలను పేర్కొనే ఎంపికను పొందుతారు లేదా రకాన్ని స్వయంచాలకంగా నిర్ణయించడానికి APIని అనుమతించండి. మీరు ChecksumValidation వివరాలు, DetectEncodingని కూడా పేర్కొనవచ్చు లేదా రన్‌టైమ్‌లో API వాటిని గుర్తించనివ్వండి.

వలయములుగా

curl -X POST "https://api.aspose.cloud/v3.0/barcode/recognize?Type=all&DetectEncoding=true" \
-H  "accept: application/json" \
-H  "authorization: Bearer <JWT Token>" \
-H  "Content-Type: multipart/form-data" \
-H  "x-aspose-client: Containerize.Swagger" -d {"image":{}}

URLను అభ్యర్థించండి

https://api.aspose.cloud/v3.0/barcode/recognize?Type=all&DetectEncoding=true

జావా

// పూర్తి ఉదాహరణలు మరియు డేటా ఫైల్‌ల కోసం, దయచేసి https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/కి వెళ్లండి

String type = null;
String checksumValidation = ChecksumValidation.OFF.toString();
Boolean detectEncoding = null;
String preset = PresetType.HIGHPERFORMANCE.toString();

Integer rectX = null;
Integer rectY = null;
Integer rectWidth = null;
Integer rectHeight = null;
Boolean stripFNC = null;
Integer timeout = null;
Integer medianSmoothingWindowSize = null;
Boolean allowMedianSmoothing = null;
Boolean allowComplexBackground = null;
Boolean allowDatamatrixIndustrialBarcodes = null;
Boolean allowDecreasedImage = null;
Boolean allowDetectScanGap = null;
Boolean allowIncorrectBarcodes = null;
Boolean allowInvertImage = null;
Boolean allowMicroWhiteSpotsRemoving = null;
Boolean allowOneDFastBarcodesDetector = null;
Boolean allowOneDWipedBarsRestoration = null;
Boolean allowQRMicroQrRestoration = null;
Boolean allowRegularImage = null;
Boolean allowSaltAndPepperFiltering = null;
Boolean allowWhiteSpotsRemoving = null;
Double regionLikelihoodThresholdPercent = null;
List<Integer> scanWindowSizes = null;
Double similarity = null;
Boolean skipDiagonalSearch = null;
String australianPostEncodingTable = null;
String rectangleRegion = null;
String url = null;

Path currentRelativePath = Paths.get("");
String currentPath = currentRelativePath.toAbsolutePath().toString();
Path filePath = Paths.get(currentPath, "data", "sample.png");

File image = new File(String.valueOf(filePath));

BarcodeResponseList response = 
   	 api.postBarcodeRecognizeFromUrlOrContent( 
      		type,checksumValidation,detectEncoding,preset,rectX,rectY,rectWidth,rectHeight,
      		stripFNC,timeout,medianSmoothingWindowSize,allowMedianSmoothing,allowComplexBackground,
      		allowDatamatrixIndustrialBarcodes,allowDecreasedImage,allowDetectScanGap,
		allowIncorrectBarcodes,allowInvertImage,allowMicroWhiteSpotsRemoving,allowOneDFastBarcodesDetector,
      		allowOneDWipedBarsRestoration,allowQRMicroQrRestoration,allowRegularImage,allowSaltAndPepperFiltering,
      		allowWhiteSpotsRemoving,regionLikelihoodThresholdPercent,scanWindowSizes,similarity,skipDiagonalSearch,
      		australianPostEncodingTable,rectangleRegion,url,image);

assertNotNull(response);
assertFalse(response.getBarcodes().isEmpty());

BarcodeResponse barcode = response.getBarcodes().get(0);
assertEquals(DecodeBarcodeType.CODE11.getValue(), barcode.getType());
assertEquals("1234567812", barcode.getBarcodeValue());
2డి బార్‌కోడ్

చిత్రం 3:- 2D బార్‌కోడ్ ప్రివ్యూ.

మీరు పైన పేర్కొన్న ఇమేజ్‌పై పై కోడ్‌ని అమలు చేస్తే, ప్రతిస్పందన శరీరం అవుట్‌పుట్‌ని ఇలా రెండర్ చేస్తుంది.

ప్రతిస్పందన శరీరం

{  "barcodes":  [  {  "barcodeValue":  "12345678",  "type":  "Code39Standard",  "region":  [  {  "x":  **28**,  "y":  **3**  },  {  "x":  **222**,  "y":  **3**  },  {  "x":  **222**,  "y":  **74**  },  {  "x":  **28**,  "y":  **74**  }  ],  "checksum":  ""  }  ]  }

ముగింపు

ఈ ఆర్టికల్‌లో, Java REST APIని ఉపయోగించి బార్‌కోడ్ స్కానర్ యాప్‌ని ఎలా డెవలప్ చేయాలో దశలను నేర్చుకున్నాము. అదేవిధంగా, ఇమేజ్ ఫైల్ నుండి QR కోడ్ రీడర్‌ను అమలు చేయడానికి API మిమ్మల్ని అనుమతిస్తుంది. Java SDKని ఉపయోగించడమే కాకుండా, cURL ఆదేశాలను ఉపయోగించి బార్‌కోడ్‌ను ఆన్‌లైన్‌లో స్కాన్ చేసే ఎంపికను కూడా మేము పొందుతాము. అదనపు సాఫ్ట్‌వేర్ డౌన్‌లోడ్ లేదా ఇన్‌స్టాలేషన్ అవసరం లేదు. APIని ఉపయోగిస్తున్నప్పుడు మీకు ఏవైనా సమస్యలు ఎదురైతే, దయచేసి [ఉచిత ఉత్పత్తి మద్దతు ఫోరమ్] ద్వారా మమ్మల్ని సంప్రదించడానికి సంకోచించకండి14.

సంబంధిత కథనాలు

దీని గురించి మరింత తెలుసుకోవడానికి క్రింది లింక్‌లను సందర్శించాలని కూడా మేము సిఫార్సు చేస్తున్నాము: