Member Avatar

Hi! I am now using androidx libraries in my andriod application. But the problem which I am facing is that the Image view of androidx library does not show/display any image on android 5(i-e lollipop) real device. But if I run the app on emulator , then my imagview shows the loaded image on android 5/lollipop. I am pasting my code of imageview. Kindly guide me what i can do to solve it. Folloiwng is my xml for imageView <androidx.appcompat.widget.AppCompatImageView android:id="@+id/imv" android:layout_below="@id/ed_note" android:layout_width="100dp" android:layout_height="100dp" android:layout_marginTop="10dp" android:layout_marginLeft="10dp" android:layout_gravity="center_horizontal" android:usesCleartextTraffic="true" android:adjustViewBounds="true" android:scaleType="fitXY" android:background="@drawable/imageview_border" > </androidx.appcompat.widget.AppCompatImageView> Now I am pasting java code for …

0
3
Member Avatar

I am making an adroid application. I am saving sales data on firebase with current date. I have formatted the System.currentTimeMillis() into SimpleDateFormat. The date is successfully stored on firebase . Now I want to retrieve sales between two dates. I made two demo sales, one on (30-5-2019) and second on (31-5-2019). For retrieving the sales data I have just put two above mentioned static dates in my Query and ran it . The problem is that it only gives me one sale record between two dates. It should give me 2 sale records. Below is my source code. // …

Member Avatar
0
33
Member Avatar

I have written a code to generate bar codes and saved them to a pdf file . The code executes successfylly but the PDF file does not open saying giving an error whome picture I am uploading. Please see my code and Picture with the error. ![barcodeError.PNG](/attachments/large/4/466b7c7d36a50fd6f88d0a7f157907c8.PNG) public void createPDF(String pdfFileName,String myString) throws FileNotFoundException{ Document doc = new Document() ; PdfWriter docwriter = null; try{ docwriter = PdfWriter.getInstance(doc, new FileOutputStream("C:\\Users\\hp430\\Desktop\\barcodes\\"+pdfFileName)); doc.addAuthor("Saboor Siddique"); doc.addCreationDate(); doc.addProducer(); doc.addCreator("SunSoftTechnologies"); doc.addTitle("Barcode Test"); doc.setPageSize(PageSize.LETTER); doc.open(); PdfContentByte cb= docwriter.getDirectContent(); Barcode128 code128 = new Barcode128(); code128.setCode(myString.trim()); code128.setCodeType(Barcode128.CODE128); code128.setBarHeight(5f); code128.setX(0.1f); Image code128Image = code128.createImageWithBarcode(cb, null, null); code128Image.setAbsolutePosition(10, 700); code128Image.scalePercent(125); …

Member Avatar
1
26
Member Avatar

Now I am making my pos software client - server based software. I am using java derby as the database. On the local host I am running the program successfully. But on the remote server I face an exception. First I tell you, how I am connecting to the remote server below: I connect my laptop to my pc through LAN Cable. I am using my laptop as client and my desktop PC as Server. On my Server I run the following command to start the Derby Server: C:\Program Files (x86)\Java\jdk1.7.0_79\db\lib> java -jar derbyrun.jar start server Above mentioned command starts …

Member Avatar
0
24
Member Avatar

Hi! I have made a POS Sotware. I have used only one JFrame as Main/Home Screen of the software and used JDialogs for all other screens. In this post I have concern with the 2 screens; Home Screen(which is a Jframe) and Sales Screen(which is a JDialog). As Home Screen appears I instantiate an instance of the Sales Screen in the constructor of Home Screen as : Sale sale = new Sale(); And on Pressing a Button on Home Screen I called : sale.visible(true); In the WindowOpened Event of the "Sale" Screen I load the products data from database and …

Member Avatar
0
48
Member Avatar

H! I am writing a java proram in which I need to generate and read barcodes to and from .PNG images. I used barcode4j-2.jar library to generate barcodes and write them to PNG image. I did this successfully. But I faced an error during reading that generated barcode from the image. I used "OnBarcode.BarcodeReader.jar" library to read the barcode but it give s me folloiwng error: java.lang.NoClassDefFoundError: com/sun/media/jai/codec/SeekableStream at a.a.b.a.a(a.java) at a.a.d.a(d.java) at a.a.d.a(d.java) at a.a.d.b(d.java) at a.a.d.a(d.java) at a.a.d.e(d.java) at a.a.d.c(d.java) at a.a.d.a(d.java) at a.a.d.a(d.java) at OnBarcode.Barcode.BarcodeScanner.BarcodeScanner.Scan(BarcodeScanner.java) I am pasting the code here: public void ReadBarcodeFromImage() throws FileNotFoundException,IOException // …

Member Avatar
0
18
Member Avatar

Hi developers! I have made a POS software. I have added the functionality of "priniting to Thermal printer" and "barcodes". Firstly I added the functionality of Reciept printing which worked perfectly. Then I added the functionality of barcode scanning. As you know barcode reader device automatically scans the barcode and write the barcode in Text field or excel sheet. But in the sales screen , all the field of item/product should be populated from database When barcode is scanned. I implemented an interface(I get this code form internet) in the my Sales Screen Constructor. It workded perfectly for me, but …

0
9
Member Avatar

Hi developers! I have made a POS software. I have added the functionality of "priniting to Thermal printer" and "barcodes". Firstly I added the functionality of Reciept printing which worked perfectly. Then I added the functionality of barcode scanning. As you know barcode reader device automatically scans the barcode and write the barcode in Text field or excel sheet. But in the sales screen , all the field of item/product should be populated from database When barcode is scanned. I implemented an interface(I get this code form internet) in the my Sales Screen Constructor. It workded perfectly for me, but …

0
8
Member Avatar

Hello to all! Hope you are fine. I am developing an e-commerce android app and integrating Stripe payment gateway in it and using Google Fire base as real time database. I browsed the official website of stripe and took the source code from there. I used my test key from there. I successfully generated Stripe Token and saved it on my server (i-e Fire base). But I am unable to make an actual charge by using that token. That means no transaction shows on my stripe account. I am pasting my code, guide me what should i do to create/make …

0
7
Member Avatar

Hi to all! I have SQL Server Express, SQL Server Management Studio 2012. My PC Name is : "SaboorPC" and SQL Server instance name is also "SaboorPC". I am trying to connect my Netbeans to My SQL Server but it is not connecting and giving the following error: "com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host SABOORPC, named instance saboorpc failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host." …

Member Avatar
0
14
Member Avatar

Hello to all! I have added a jcombobox in a jpanel by dragging it from palette (Netbeans IDE). I am populating jcombobox with database without any problem. For example i have following 5 items in my jcombobox: Italy, Uganda, America, Canada, Austria When my jtable is focused and i type any key from key board e.g 'A', then the jcombobox filters perfectly and shows me the items: America, Austria. This is perfect working of jcombobox filtering i-e it filters the items on the base of first characters or alphabets from the left. But I need some advance filtering for example: …

Member Avatar
0
35
Member Avatar

Hello to all members! This post is not about programming, it is related to rights of digital content. I am posting here after searching on internet. Sorry in advance, but please guide me, I am in lot of confusion and frustration due to this. Actually I have made an simple android app which just redirects its users to their favorite brands' websites or online stores. I just downloaded free images of famous brands and added them in my app. When any user clicks on his favorite brand's image, app redirects the user to webiste or online store of that brand. …

Member Avatar
0
21
Member Avatar

![Hello to all members! Actuall I have made an simple android app which just redirects its users to theri favorite brands' websites or online stores. I just downloaded free images of famous brands and added them in my app. When any user clicks on his favorite brand's image, app redirects the user to webiste or online store of that brand. The advantage of this app is that user would not need to search his favorite brand's website using browser, rather he can open my app and click on his favorit brand's image and will be redirected to official website or …

Member Avatar
0
10
Member Avatar

Hello! I have a grid view with the row model having a image view and text view in it. I set a custom adapter to populate the the grid view with images and texts successfully. But now I want to use a search view to filter the grid view on the base of text in text views. For this I implemented Filterable interface . When i enter the string in my search view nothing happens. I am pasting my code also. Please check it . All the code is in one class. Please view the code in the inner classes …

0
5
Member Avatar

I have to print some text to printer. I needed to translate that text in Urdu language also. For that I used google translation API and all was set. But I am facing problem in order of output. // this is the code which is giving my desired output String text = "Honda head light large size" String translatedText = GoogleTranslate.translate("ur", text); String myString = "Saboor" String printString = String.format("%-15s %-15s %-10s",text,translatedText,myString); graphics.drawString(printString,x,y) //Above code is giving me correct output as following Honda head light large size urdu translation Saboor // Now pasting the code which create problem: String text …

Member Avatar
0
30
Member Avatar

Hi I am developing an app for a specific facebook page. The problem is that when i load URL in mywebview.loadURL(https://web.facebook.com/CoversShopping/). The page opens successfully but the page always reload when the oreintation changes. This problem only occurs for the above type Urls(i-e when I give the link of specific facebook page). But if i load URL as www.facebook.com or www.youtube.com or http://www.easyonlineconverter.com/converters/case_conveter.html no any page reload occurs as I have set android:configChanges="orientation|screenSize". Even If I give URL of any website with its specific page ,no page reload occurs when orientation changes. Page reload only occurs in case of specific …

Member Avatar
0
18
Member Avatar

I have made a simple app which gets curren location (latitude and longitude). It is working perfectly. But now i want to take location updates. For this i implemented LocationListener interface . I overridded the metod On location Change, but when i run the application, this method does not respond in any way. There is no error, no exception and no response I have attached my code. Please check it and guide me package com.example.hp430.gpslocaction; import android.Manifest; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.provider.Settings; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AlertDialog; import …

0
12
Member Avatar

Hello! I have installed android studio 3.0.1 in my laptop . I had some android projects in my desktop computer (with older version of android studio) But after installing latest version(3.0.1) of android studio in my laptop, i copied projects from my desktop to my laptop and opened that projects in my new android studio(3.0.1) But there appears an error: "Gradle project sync failed. Basic functionality(e.g editing, debeugging ) will not work properly" And in the console a message appears: ""Unable to resolve dependency for: 'app @UnitTest/compileClassPath: could not found any version that matches com.android.support: support-v4:27.+. I can't understand this …

0
7
Member Avatar

Hi I have made a desktop application and i have to print some data to printer.For this purpose I have done my code and ran it successfuly and test on xps doucuments and on oneNote . I have no physical printer but i am satisfied by testing it on xps documents and one note e.t.c. But actually i have to print receipts and i dont know how to support different receipt printers with my java application. For example i want to use a Epson TM-T88i receipt printer with my application. So what should i do? Is there any need to …

Member Avatar
0
38
Member Avatar

Hi! I have developed a desktop application in java. Now I want to do payment integration with this app. Actually I have to do payment integration for first time in my life. So i have some questions/confusions for payment integration. But before asking those questions I tell you that what i want actually. I have many features in my app. I want that some a features available for free and some availabe after the user purchase my software Questions: 1:) I have no website and i have not hosted my software on any hosting website. Is it compulsory to have …

Member Avatar
0
55
Member Avatar

HI! I have made an desktop application, which i have to install on my client's pc. But I want that, except that particular cleint's pc, no other pc could run it. For this purpose i got a solution to get mac address of that pc and make a check for that. But according to me this solution is not permanent as mac address changes with the NIC. Now a days people use USB Internet devices(External NICs/Wireless modems) to use internet. When they change their device, obsviously mac address and ip address changes automatically. I want a solution other than mac …

Member Avatar
0
14
Member Avatar

Hello! I am developing a POS System. I have need to print Sales receipt. I have no physical printer to test my printing but i have print on xps document. I am facing a problem with indentation of my data on Sales receipt. Following is the code which i wrote to print my recipt: @Override public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { if(pageIndex > 0){ return NO_SUCH_PAGE; } Font f; int y = 15; int rowCount = model.getRowCount(); String s = String.format("%s %30s %30s %30s", "item","Qty","Price","Amount"); String s2 = String.format("%s %30s %30s %30s","-----" ,"-----","-----","-----" ); f …

Member Avatar
0
68
Member Avatar

Hi! I have made a desktop application which is running perfectly. But i am facing problems with jframe size on different machines. I have monitor of 'Gateway'. I am satisfied with my jframe size on my screen . But when i shifted it on laptop of 'hp' company then my jframe and its child components appears very small. For example I have a jframe named 'Home.java'. I set size of this jframe by following code java.awt.Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setSize(screenSize.width,screenSize.height); On my monitor it appears very well i-e it takes monitor's screen size and flatters according that. But When i …

Member Avatar
0
21
Member Avatar

hi! Actually my question is about a mobile application. I am using nokia 2700 classic. And i use face book on this mobile and i have also downloaded messanger on it. But my messanger is not running. When i open my messanger then following error message displayed: " can't sign you in because your phone is in flight mode or you have not data connection." but i have data connection and my phone is not in flight mode. So what is the reason behind above mentioned error message and what should i do?

Member Avatar
0
16
Member Avatar

hi ! I am developing a pos software for desktop. I am using java derby database for this. I have developed a feature for purchasing items and also a feature for analyzing purchases so that the user can view that what, when, how much he purchased. I am using two dateChoosers one for startDate and other for endDate so that user analyze his purchases according to his desired dates. I wrote following query: Select * from purchase where date Between ? And ? Now i tell you what output i want and what i am getting For example when i …

Member Avatar
0
25
Member Avatar

Hi! I am developing a pos for a store. I have created a settings window. On this window there is a button which is used to set a name for store. When user press this button a message dialog appears with a text field and a OK button so that user enter text for his store name. I made this message dialog by using a jpanel. Below I am giving the code. for this message dialog. JTextField field = new JTextField(20); JLabel label = new JLabel("Enter name for your store"); JPanel p = new JPanel(new BorderLayout(5,2)); p.add(label,BorderLayout.WEST); p.add(field); JOptionPane.showMessageDialog(null,p,"Store Name …

Member Avatar
0
39
Member Avatar

Hi! I have create a simple desktop application (CRUD operation) using java derby by using the library "derbyclient.jar" I want to deploy it on another computer which not have netbeans IDE installed. I ''clean and build '' the project and a jar file created in dist folder of my project directory. When I ran this jar file , it ran successfully on my computer because it found java derby easily. But when I closed my Netbeans IDE, and double clicked on that jar file , the application did not execute because it did not found java derby to connect. I …

Member Avatar
0
9
Member Avatar

Hi to all! I am using sql server 2008 enterprise edition. My instance name is "saboor-pc/ SQLSERVERENT". I am using this server for many months and i am satisfied but today an unexpected error occured when i clicked on "connect" button in sql server management studio. The error was: "Cannot connect to SABOOR-PC/MSSQLSERVERENT A connection was successfully established with the server, but then an error occured during the pre-login handshake(provider: SSL Provider, error:0 The message recieved was un expected or badly formatted)(MicroSoft SQL Server)" above is the error statement in double quots. Please guide me how can i solve this …

Member Avatar
0
55
Member Avatar

Hello to all! I am going to make a stock management and Point of sale for a person on Ms Excel file. Actually my client has a store of bedding accessories (e.g pillows, blankets, quilts, cushions. bedsheets and many other items).I have to maintain such an excel file that should maintain stock as well as keep record of sales and profit. I have worked about 70 percent as per requirements of my client. The confusion which I am facing is about charges of my work.Please guide me how much money should I demand from my client.Will it suitable to demand …

Member Avatar
0
15
Member Avatar

Hello to all members! I want to install "dotNet frame work 3.5" on windows 8. Whenever I tries to install the frame work , following error appears: "could not download files, network speed is very slow, Please recheck your internet connection"e.t.c But my internet connection is very well. I dont know why this error occurs I searched for this error on google and i found some methods to solve this error but despite of applying those methods I could not get rid of this error. I am also pasting that links from where i find the methods but all in …

Member Avatar
0
8

The End.