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

First advanced app

Hello everyone!

I am trying to start make my first app. I am not the best programmer, I am not asking you about "how to programming" but for diagram where to start.
My application seems to be quite easy, (but not too easy like WebView option) .

I can pay for any person who want to help me. I need to information what I need to do, Like Step By Step.

Thanks

no such table SQLITE

Hi, I'm a noob in programming android apps. When using SQLite Database I got following problem:
Logcat tells me: "no such table: table1", when I run both methods. Where is my mistake?
I use an existing database, placed in assets/databases folder.
MainActivity
Java:
package com.dplusk.example_sql;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    DataBaseHelper dataBaseHelper;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void onClickSearch(View view) {

        dataBaseHelper = new DataBaseHelper(MainActivity.this);
        try {
            String post = dataBaseHelper.getPost("table1","Moser");
            Toast.makeText(this,String.format("%s",post),Toast.LENGTH_SHORT).show();
        }catch (Exception e){
            Toast.makeText(this,"Error",Toast.LENGTH_SHORT).show();
        }
    }

    public void onClickUpdate(View view) {
        //Toast.makeText(MainActivity.this,"Saving successful",Toast.LENGTH_LONG).show();
    }

    public void onClickRows(View view) {
        dataBaseHelper = new DataBaseHelper(MainActivity.this);
        try {
            long count = dataBaseHelper.numberOfRows("table1");
            String message = String.format("%s",count);
            Toast.makeText(MainActivity.this,message,Toast.LENGTH_LONG).show();
        }catch (Exception e){
            Toast.makeText(this,"Error",Toast.LENGTH_SHORT).show();
        }
    }
}
DataBaseHelper
Java:
package com.dplusk.example_sql;

import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class DataBaseHelper extends SQLiteOpenHelper {

    public DataBaseHelper(@Nullable Context context) {
        super(context, "database.db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    }

    public String getPost(String table, String nameIn){
        String queryString = "SELECT post FROM "+ table +" WHERE name = "+nameIn;
        SQLiteDatabase db = this.getReadableDatabase();
        Cursor cursor = db.rawQuery(queryString,null);
        StringBuffer buffer = new StringBuffer();
        while(cursor.moveToNext()){
            String post = cursor.getString(0);
            buffer.append(""+post);
        }
        cursor.close();
        db.close();
        return buffer.toString();
    }

    public long numberOfRows(String table){
        String queryString = "SELECT * FROM " + table;
        SQLiteDatabase db = this.getReadableDatabase();
        Cursor cursor = db.rawQuery(queryString,null);
        long count = cursor.getCount();
        cursor.close();
        db.close();
        return count;
    }
}
Please help me.

GrapheneOS

Hi

I dont know if anyone can help me, I bought a google pixel3a to install grapheneOS, I followed youtube videos particularly Techlore and also used grapheneOS site.

The problem I have is aftler locking the bootloader the phone reads

Cant find valid operating system. The device will not start. Im a bit tech savy with some things but im struggling with this.

Ive searched a lot of forums including this one and other particularly reddit and xda. Ive even tried installing fastboot with adb but it doesent seem to recgonise the phone now. Has anyone had similar issues? I also know this is a fault that can happen with some google phones, if anyone can help please let me know.

Some links ive used to help me...

https://www.reddit.com/r/GrapheneOS/comments/d7h3og/3xl_cannot_find_operating_system/

https://forum.xda-developers.com/t/...sb-driver-installer-tool-for-windows.3999445/

https://www.reddit.com/r/GrapheneOS/comments/e07t56/building_grapheneos_boot_issues_with_locked/

https://www.reddit.com/r/GrapheneOS/comments/celjj7/locking_the_bootloader_after_flashing_pixel_3a/

https://www.reddit.com/r/GrapheneOS/comments/g1j5gs/graphene_install_on_pixel_3a_using_windows_10/


Thanks in advance.


Hey you've probably figured it out by now but don't use any installation guide other than the one included on the GrapheneOS site. Also they have a nifty USB based installer that you use on their webpage. Unless you're tech proficient don't try and do the manual CLI installation

About rooting Galaxy core prime g360h without pc

Im guessing @sepide has installed the TWRP app as opposed to flashing a custom recovery as that would require a pc. The first time I rooted (Galaxy S3) was with an app. It gave me some experience in regards to android root and at firsy I was extremely great full to finally have root access. That lasted about a day lol. For the next three or four weeks I was battling that dam app for control. It was a mimic of SuperSu without the app controls. Furthermore it didn't even have an icon, just a pop up allow, grant, promp and no app interface. It foced me to learn the file systems (so what ) and replace it with SuperSu. Even so I had no idea what possible malware was left in the file system. A few months later, I used a pc program to flash
Cyanogen Recovery (yes that long ago lol). I now use TWRP custom recovery and have no use for the app itself.
ahhhhh yes you are right twrp does require a pc.....i think the op is SOL then without a pc.

op can't you borrow or use a friend's pc to fully root your phone?

Filter

Back
Top Bottom