sameera liyanage wrote:But i have added the below to manifest
Yes, you defined an Activity with the name Global. But you try to get the application (Global global = ((Global)getApplicationContext());) and assign it to Global. The Application Context is a subclass of android.app.Application, not an activity.
You can either call getTIME() (for example), and then do whatever needs doing with the array it returns, or add a method that addToTIME(String) that adds that string as the last element of the TIME array.
Two remarks, though: variables have lowercase names. While uppercase is permissible, it is so exceedingly rare that people who look at your code will wonder what's going on. Uppercase is generally used for names of constants.
Secondly, if you don't know beforehand how many elements an array has, it's probably better to use a Collection instead of an array - maybe an ArrayList<String>. That makes it easy to add elements at the end, and to find out how many elements it already contains.
Destiny's powerful hand has made the bed of my future. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards