• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps MySQL connect and query

Hello dear helpers,
I'm new to app development and with the help of a youtube tutorial I started an app that should connect to an SQL server and query data, but now I get an error that I can't sort and hope for help from you.

Code MainActivity.java:
Java:
package com.huth.system;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public class MainActivity extends AppCompatActivity {
    Connection connect;
    String ConnectionResult = "";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    public void GetTextFromSQL(View v)
    {
        TextView tx1 = (TextView) findViewById(R.id.textView);
        TextView tx2 = (TextView) findViewById(R.id.textView2);
        try {
            ConnectionHelper connectionHelper = new ConnectionHelper();
            connect = connectionHelper.connectionclass();
            if(connect!=null)
            {
                String query = "SELECT * FROM `app`.`app_user` where id='1';";
                Statement st = connect.createStatement();
                ResultSet rs = st.executeQuery(query);

                while (rs.next()){
                    tx1.setText(rs.getString( 1));
                    tx2.setText(rs.getString( 2));
                }
            }
            else
            {
                ConnectionResult = "Check Connection";
            }
        }
        catch (Exception ex){
            Log.e("error2", ex.getMessage());
        }
    }
}
Code ConnectionHelper.java:
Java:
package com.huth.system;


import android.annotation.SuppressLint;
import android.os.StrictMode;
import android.util.Log;

import java.sql.Connection;
import  java.sql.DriverManager;

public class ConnectionHelper {
    Connection con;
    String uname, pass, ip, port,database;
    @SuppressLint("NewApi")
    public Connection connectionclass(){
        ip= "*******************";
        port = "*****************";
        uname = "*************";
        pass = "****************";
        database = "************";

        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);
        Connection connection = null;
        String ConnectionURL  = null;
        try{
            Class.forName("net.sourceforge.jtds.jdbc.Driver");
            ConnectionURL = "jdbc:jtds:sqlserver://"+ ip + ":"+ port+";"+ "databasename="+ database+";user="+uname+";password="+pass+";";
            connection = DriverManager.getConnection(ConnectionURL);
        }
        catch (Exception ex){
            Log.e("error", ex.getMessage());
        }
        return connection;
    }
}
error massage:
E/error: I/O Error: Unknown packet type 0x63


pls help me :)

Samsung Galaxy S 22 Plus or Ultra

Hello. I am considering buying a Samsung Galaxy S 22 Ultra or Plus. I have listened to a lot of reviews that say that the Ultra is not recommended as it tends to run hot. I have also read that the S 22 Plus is better and doesn’t run as hot. I am wondering if this issue of running hot has been solved by any updates, etc.. If anyone would like to recommend one phone over the other (or a Samsung 2-3 years old that’s better, I would appreciate that also. Thanks.

Help How to disable blinking notification icon in peek display?

I cracked the screen on my phone (moto g power 2021) and bought the the exact same model to replace it. Both are running the same Android 11 build.

On the Peek Display, the old phone shows a simple icon for notifications, e.g. new email. The new phone shows a flashing icon for notifications with "Tap and hold" above it. (See photos below.)

The flashing/blinking icon is annoying, but I can't find a setting to make the Peek Display use a plain non-flashing icon like my old phone.

How do I configure Peek Display notification to use just the icon and not the blinking/flashing icon with "Tap and hold" above it?

peek_screen_new.jpg
peek_screen_old.jpg

Unlock question

I have a Galaxy s10. I have requested an unlock from AT&T. The only thing I received was a photo saying it was unlocked. It also said that they would send a text or email. I didn't receive either. Reading other unlock posts, I noticed talk of an unlock code. Do I need one to finalize the unlock? Is there any way I can tell if the phone is unlocked?

z fold 3 screen protector wore out

so mine started to separate right where the crease is. so now the crease used to be not noticeable, until now. i went to my Samsung experience store and i had to either wait up to 4hrs nearby for walk-in help or wait for 2 weeks for an appointment. i opted to wait 2 weeks as it is not really a pressing need.....just sucks is all.

anybody else's protector wearing out like mine is?

Can't get HDMI output - SOLVED

I have an S21 5G and I'm trying to connect it to an external monitor. I have tried a USB-C to HDMI cable with no luck on two monitors. I looked at quite a few YT videos that said to use a USB-C to HDMI adapter with an HDMI cable. Those just arrived with the same results, no signal detected. At this point it either has to be a setting on the phone, or some simple user error. I can't find any HDMI settings for the S21. I am on Android 12. Some folks say go to Settings -> Connections -> More Connections -> HDMI, but my phone does not list the HDMI option. All I see are "Nearby device scanning", "Printing", "VPN", "Private DNS" and "Network unlock".

What am I missing?

4g status goes away with wifi enabled.

I'm trying to figure out why my 4g indicator goes out with wifi connected. If I have a 4g signal and then enable wifi, the "4g" goes a way. I still get full signal but it does not indicate its 4g. The phone does not support wifi calling, so if that is it, maybe that is why. Incidentally the cell signal is crap at this point. I do not get any usable service. To use my cell service I have to turn off wifi.

New way Android updates itself?

I have mentioned a few times in passing, but my carrier finally forced me to update from my beloved HTC Thunderbolt and Samsung Galaxy SII sometime around July/August. They were working fine, but in late July phone calls stopped working on the SII entirely (dials and gives up) but both still could text and use data. In August they both only get data and no longer send/receive SMS/MMS or make calls anymore. The Thunderbolt of course kills itself trying to get a signal despite it showing 5 bars of LTE service and 4 of 1X, which technically means it should still work but oh well. I tried, I failed. Had to upgrade. I decided to go back to Samsung with a A13 5G, which has been an excellent phone thus far.

I finally decided to go for the OneUI 4 Android 12 update, and I had a security update pending since I bought the phone in August. I had disabled all updates at the time via NetGuard to stop it from nagging me each time I unlocked to download/install the update.

The security update was only 1GB, but when it restarted, it had updated already to Android 12 and OneUI Core 4.1, almost as if a switch had been flipped. It didn't list the update as anything other than a security patch. Usually it tells you that it's an actual version update and is much larger, around 2-4GBs. It's like the phone already had the code for Android 12 as part of its original firmware and a switch in software flipped and there it was.

Is this a new method of Android system updates? It was fast and quick, which is not usually the case. I'm used to dealing with software and battery issues and a really hot phone after an actual update and factory resets to fix those. This was perhaps the most painless version update in my life!

Generic Projector Firmware

I have a generic projector bought from Wish a while ago, I was looking at trying to update the firmware (must be done via flash card) but cannot find anything online about it. It seems to be a custom Android ROM but I don't really know much more than that. Is anyone able to help at all? Screenshot attached of the information I was able to see
MEEB40L

Attachments

  • 20221001_172929.jpg
    20221001_172929.jpg
    355.2 KB · Views: 744

Another day, another lie

This time's about a computer that I will supposedly be donated on Monday. Hell will probably freeze over first, but just in case this is not totally fake, I want to review the phone fix stuff: minimal adb + fastboot, usb drivers, etc.. I also want to make sure I know enough about Linux (most likely Ubuntu because I have used it years ago), and Calibre at last, I hope. Keeping in mind that this would be a freebie, I expect minimal onboard storage/memory. I probably won't be able to cram it all in there, which of course leads me to the topic of expansion, most likely external. I would like to have at least 1 tb, 2 or more if possible. Wish me luck...

how to turn this off

i just got this a51 from tracfone yesterday as an upgrade from the a21 they sent me last year. it took hours to get all my data on the a51 using samsung's backup and then using the smart switch but it finally made it. now it will not turn off. also it must have done 6 updates for android for the same update. so i had to turn on developer and then select no factory auto updates. anyway i press the power button and i get bixby and so i tried to turn that off and now i get bixby and the message that says it takes a week to get me off that system before i can get back on it if i need to.

so where do i go on the a51 to get the power button to actually allow it to turn off. now i have to swipe the top down and then there is a notice that i tap and it tells me to turn it off there.
so does any here have a fix for that.

How much data of a user get recorded by service providers?

If someone from India has optical fiber connection internet for windows10 PC and mobile phone 4g network provider’s internet for android cell phone using 4g sim card, now sometimes he uses PC’s OFC internet in mobile and mobile’s 4g internet in PC using wifi hotspot and both PC and mobile phone’s internet/network service provider companies are different but constant, and he uses 1.1.1.1 and 1.0.0.1 as DNS server instead of ISP’s dns server for PC, and he saves all login credential on Edge browser on both PC and cell phone and two devices’ browsers are synced and he uses autofill during login in a website on Edge browser, then -

1)- Does/can ISP store all his browsing history ? also can/does ISP see/know what he’s doing inside a specific website like what he’s searching on google and which file he is storing in google drive, which files he is downloading, like can they know the stored/downloaded file’s name and content inside? Can/do they see his login credentials for a website? Can/do they read my emails? If they can then for how long do they keep the data stored before erasing completely? Does law allow them to do all of those and does law allow police to get those data from ISP and how much police can ask for?

2)- Does/can network service provider of a cell phone record all the voice calls/messages/whats app chats of a user? If so then for how long do they keep the data stored before erasing completely? Does law allow them to do that and does law allow police to get those data from ISP and how much police can ask for?

N.B. During the occurrence of all those above said events the user had no police case against him and Police was not trying to do anything at all against/about him and police did not even know his existence at all as he doesn’t have any criminal record in the past at all. But only days later of those events for the first time in his life police may start to try to acquire those above said datas which occurred in the past.


N.B. Please don't remove my post because of the off topic part about law, please answer only about the tech part if the law part can’t be answered here. Sorry for many questions at the same time, but those are so tightly related that I could not find a way to ask them separately.

Stats on data sharing apps in the Play Store

https://blog.incogni.com/sharing-is-not-caring/

-- Since it is pretty much a given that our phones are so perversely effective at vacuuming up our personal data an article like this should not be a big surprise but there is a lot of insight about specific details. Keep in mind there is a subtle distinction between collecting and sharing data vs. just collecting data, and as the article also states, it's still a mystery as to just what these services are actually doing with our data. We can make guesses about some of that (i.e. selling out to data brokers, targeted ads, improving customer engagement, blah, blah, blah) but there's a lot that may never be revealed to us.

How to generate a large number of phone numbers?

Some people here in my country offers service of helping receiving SMS for verification of different services for those who wants to register as a new member to get coupons and discounts for new members only. They are able to provide a lot of different phone numbers every day and they are not charging too much for the service. I really wonder how they are able to get so many phone numbers? I don't think there is any service provided by the carrier to generate many different numbers, at least in my country. Does anyone have an idea or a guess on how they get a lot of different numbers for this cheap?

  • Poll Poll
Want to learn Android Development- Suggestion Please

Should I Enroll?

  • Yes

    Votes: 0 0.0%
  • No

    Votes: 0 0.0%

I want to learn android development but I don’t know where to start. I have tried looking at courses, books, and tutorials online but they are all confusing.

I found this course and looks promising should I enrol @ Coursera?

https://www.mooc-course.com/course-tag/android-app-development-specialization/

WhatsApp noch kostenlos?

Wanted to use WhatsApp again after a month or two. Had to be reinstalled first, phone number entered, etc. Still doesn't work.

Is it still free like it was before? Or what does this hint(?) mean (saying, mobile phone provider charges may apply):
2xok20X.png


Don't get these to work, this always appears (saying the app was closed):

UaUMY7i.png

How does phone tracking by police work?

For android phones in India-

1). can police get a phone's imei number just by using that phone's number?

2). also suppose if a phone was moving around within few miles radious for few days and it was turned on several times in that duration. But now the phone is turned off permanently and only after phone is turned off police starts to try to track the phone for the first time using only the mobile no which was being used by that phone when it was turned on in last few days. So can police get all the locations where that phone were in those last few days ?

3). Also if that phone's user turns off permanently or throws away the phone and take a new phone and inserts the same sim card in that new phone, and only after that if police starts to try to track using that mobile no for the first time, can police even get all the location infos about where that old phone were for last few days before it was thrown away?

Filter

Back
Top Bottom