I am sub-dividing an app I have into "common platform" and "app"
layers so that I can distribute the platform as a jar for use by
partners - and retain my IP.  I now have two different Eclipse
projects. I moved all resource references into the app project - the
platform project gen directory is empty. I compiled and jar'd the
platform, imported the jar into the app project, marked the jar for
export, and successfully compiled and installed a test app:

public class NotifyService extends Service {
    ...
    @Override
    public void onStart(Intent intent, int startId) {
        myNotify(intent.getIntExtra(EXTRA_ICON),...));
    }

    private void myNotify(int iconResource, String s1, String s2,
String s3) {
        Context c = getApplicationContext();
        if (H.VERBOSE) Log.d(TAG, "myNotify()"); //$NON-NLS-1$
        Notification n = new Notification(iconResource, s1,
currentTime);
        Intent nextStep = new Intent(Intent.ACTION_VIEW,Uri));
        PendingIntent pending = PendingIntent.getActivity(c, 0,
nextStep, 0);
        n.setLatestEventInfo(c, s2, s3, pending);
        mgr.notify(1, n);
    }...

The test activity launches as expected and I get the LogCat() message
from this service. But no notification is shown and no error is logged
- its just silent.

The only argument I've not passed in is the context. I didn't pass
that as I read that getApplicationContext() returns the single global
context - I can't imagine passing it will make the difference.

Anyway, I want partner apps to make use of my platform - which in turn
connects to services, content providers, the web, the works. Anyone
offer some guidance?

Many thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to