JAR文件中调用活动 [英] Calling Activity within jar file

查看:141
本文介绍了JAR文件中调用活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要使用,开始从jar文件的活动与我的应用程序。在我的jar文件我用

I want to use to start an activity from jar file with my application. In my jar file i use

Intent intent=new Intent(cl,com.jar.Adview.class);
            cl.startActivityForResult(intent,0);

其中,CL是我的应用程序的活动。 Adview.class是我叫com.popupjar.But它抛出空指针异常jar包。如何做到这一点。请给我一个解决方案。

Where, cl is Activity of my application. Adview.class is in my jar package called com.popupjar.But it throws null pointer exception. How to do this. Please give me a solution.

请注意:意图将是一个方法。当我打电话的方法在我apllication意图活动希望的开始。

Note: The intent will be in a method. When i call the method in my apllication the intent activity want to be start.

推荐答案

检查:<一href=\"http://damianflannery.word$p$pss.com/2011/06/13/integrate-zxing-bar$c$c-scanner-into-your-android-app-natively-using-eclipse/\"相对=nofollow>整合zxing酒吧code扫描到您的Andr​​oid应用程序本身使用Eclipse

检查第4步(包括ZXing的Andr​​oid到您的项目)。你可以看到如何为扫描活动(这是在罐子)被调用。

Check the step 4(Include ZXing Android into your project). You can see how the activity for scan (which is in the jar) is being called.

希望这会有所帮助。

这篇关于JAR文件中调用活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆