How to acces it from a different class
<p>Ok I kinda got stucked on the basics.I have a method in class that shows a notification in the notification bar. I tried to make it static but if I make it static,some functions won't work.</p>

<p>So if I have the following function in x.class,how can I access it from y.class? Because I tried with static,and with objects,but all failed.</p>

<pre><code> void notify(String i) {

        String ns = Context.NOTIFICATION_SERVICE;
        NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);


        int icon = R.drawable.icon;        // icon from resources
        CharSequence tickerText = "gogu la telefon";              // ticker-text
        long when = System.currentTimeMillis();         // notification time
        Context context = getApplicationContext();      // application Context
        CharSequence contentTitle = "My notification";  // message title
        CharSequence contentText = "Hello World!";      // message text



        Intent notificationIntent = new Intent(this, MilkyWaySearcherActivity.class);
        PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);

        // the next two lines initialize the Notification, using the configurations above
        Notification notification = new Notification(icon, tickerText, when);
        notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
        notification.ledARGB = 0xff00ff00;
        notification.ledOnMS = 300;
        notification.ledOffMS = 1000;
        notification.flags |= Notification.FLAG_SHOW_LIGHTS;

        mNotificationManager.notify(BIND_AUTO_CREATE, notification);
    }
</code></pre>
