Just another curiosity, if I can... If I start thread with Thread instance and Run method, how can I kill this and, if it's required, restarting when it's required. Can I use thread.destroy() ?
It is not obvious why you need this array or exactly what you are trying to do with it. You also need to instantiate a Global object somewhere, rather than trying to call getApplicationContext and trying to cast it to a Global.
However your reference code needs to look like:
Global myGlobal = new Global();
// this will not work as you have coded it// final Global globalVariable = (Global) getApplicationContext();//set the value for myarray// but first you need to get the reference to the array:
string myArray = myGlobal.getMyarray(); // returns the array reference
myArray = "me"; // set the value of a single array element// get the value of myarray finalString name = myArray;
Although the above code will (sort of) work it is still lacking context so you need to provide more information on what you are trying to do.
I was to build a simple e-retail android application for our shop. It should have basic features like add to cart, payment and search features. I am comfortable with the basics of android. However, i am still not aquatinted with back-end and server-side development. Please can anyone suggest suitable sites or links to guide me for this project?
(PS: I want to develop the app myself rather than taking help from any external app development company etc.)
Learn how to consume REST APIs in Android applications. Then, create a RESTful API to communicate with the cloud. Other frameworks may have other confusion in them and that is one of the reasons why I don't use those frameworks.
Create a simple web applications, Node.js, PHP, ASP.NET, doesn't matter. Allow users to connect using native HTTP protocol, to RESTful APIs, where the communication input and outputs are natively in JSON (no overhead). Then, program the rest of the parts of the application to use that JSON content, and upload the JSON content. For bulk or blob publishing, accept the files and set the enctype to multipart/form-data.
07-26 19:48:22.594 2618-2618/com.example.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.example, PID: 2618
java.lang.NullPointerException: storage == null
at com.example.example.CustomList.<init>(CustomList.java )
at java.lang.reflect.Method.invoke(Native Method)
It is difficult to see exactly which variable is null, but it looks like you are sending a null value from the CustomList constructor, to create the new ArrayAdapter. You should look at your ParseJSON class to see what values it is returning.
Last Visit: 31-Dec-99 19:00 Last Update: 9-Dec-23 11:13