I am developing a Bluetooth app that is always running until user uninstalls app or switches off their mobile. I am getting an error message: "unfortunately app stopped working". From my initial research this appears to be a memory leak issue. So far I have found out that any object with static reference will leak memory. So I need to remove static references of variables. My project has many constants, how can I write constants without using public static final?
currently, i am using something like this:
public static final int NOTIFICATION_ID=1234;
Update
I think My question needs some more info so here it is
private static variable problem 1) Hi Friends,My app uses database has 9 tables each table has 7 to 13 columns,So the column name I am declaring like private static final String COLUMN_NAME_ACTIVE = "active"; similarly more than 70 static variables has been declared. 2)some of the instances to access in another class i have declared 3)1 util class it is a static class