开发者

Android Pros: How to wrap PayPal's MPL?

I have no Java experience and prefer Visual Basic; I've found a very nice translation IDE called Basic4android (www.basic4android.com). It works by interpreting a scripting language that's similar to Visual Basic and then using it to generate and compile native Java code. Rather ingenious, if you ask me. In fact I believe I found it from a reference here on StackOverflow.

I'm having some trouble wrapping PayPal's Mobile Payments Library:

www.x.com/community/ppx/xspaces/mobile/mep (scroll down for the HTML Tutorial)

I need to do it in a way that promotes the library's functionality so that B4A can in turn expose it to the Android device (emulator in this case). I've made some halting progress so far, but now I'm stuck on NullPointerExceptions occurring deep within the MPL.

The saga is pretty well described in a thread at their forum:

http://www.basic4ppc.com/forum/additional-libraries-official-updates/8819-looking-download-link.html

Here's my wrapper and the generated code—download here—as only licensed users may access downloads in that particular forum section.

The latest NullPointerException occurs a few calls down from the initWithAppID function. The JD-GUI decompiler reports an internal error when it 开发者_JS百科gets to the com.paypal.android.b.b class, so it doesn't appear to be possible to know exactly what's going on down there.

I'm certain this can be done; I just need to know how to open the proper communication channel between the device and the MPL.

I'm new at Java and I'm new at Android. Quite a combination, wouldn't you say?


It turns out the problem is in the way PayPal bundles their resource files; non-Eclipse projects can't get at them.

More info on the original B4A thread.

Thanks, Jeff


I think if you ask here about something that generates code for you, you won't be provided with any answers because you can't give any useful source code or something. Also, if you use something like this tool, you never know what it's generating. Also, you can't fix any occurring errors with the generated code... I could go on and on and on...

If you want to use Android the way it's supposed to be used, you'll need to learn Java and Android. If you are good with VB, this shouldn't be that hard. And this is what anyone is going to tell you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜