04-12-2011 09:50 AM
Hi to all. I have a question ?
I have an app and a library. Inside the app a have a lot of calls from this library (easy to say my app it's dependent on the library ).
I tried the following scenario: in main app I have added logic to download the library programatically. But something I missunderstood around that. So, I am downloading first my app which is dependent on the library then I was thinking to check in constructor if the library exist then activate the app if not then download the lib and reboot the device.
My problem now is if i have at list one call of class from the library then the app will not work and will thrown the exception that "The app has verification errors".
So how can I avoid that ? or even
How to download that lib from the app and have inside that app other methods calls from the library which is not yet downloaded ?
Thank you in advance. A sample will be apreciated.
Solved! Go to Solution.
04-12-2011 09:52 AM
you can add the library in your jad or alx file to be downloaded together with your main application.
search the forum for more details on this.
04-12-2011 10:05 AM - edited 04-12-2011 10:07 AM
Simion firstable thank you for your quik reply.
Second, I know about this, which means that the library is static I was trying to have a dynamic one downloaded from the app.
I have allready this solution to download the library along the app, but this involves every time for different apps by using the same library a lot of work . Also here could be applied two cases:
1) when the library has same package name for every app - the issue is that for the second app the user will be ask to reboot the device which is not user friendly
2) when the library has a different package name , it is user friendly but involves many steps : like change the package name, resign the app and upload the library together with single un on the server ?
So, how about dynamic library or even other suggestions along that ? (also having another app as a lib will not be a user friendly solution)
04-12-2011 10:17 AM
we have a library on development-side, for example, and add the classes we need to the project.
this means, on the one hand, that potentially 5 identical classes exist on a device (if 5 apps are installed), but other than wasting space there is no harm done.
on the other hand we can use different versions of the library in different products.
we use a maven task to copy the classes from the lib project into the live one, but i guess there are many solutions there, including copying by hand.
we also use standalone apps, like ksoap2.
as far as rebooting is concerned: a user does not install the software so often, rebooting the deivce is not that big of a deal. in fact i guess that windows users are pretty much used to the idea
if you want to avoid it you can remove the library from alx/jad if you are sure that it already exists on the device. you can also add it later, if this assumption was incorrect.
04-12-2011 10:44 AM
I was trying the following : in simulator I was uploading the app cod file which depend on the library, then I was checking if the library exists then activate the app if not then download it, the issue came out having a call to a class from the library which is not yet present on device. When I am trying to open that app I am getting the error "App has verification errors " and also my lib wasn't downloaded.
Is that possible to call class from a library which is not yet on device, and if not then download it from the app ?
Thank you in advance.
04-12-2011 10:49 AM
no, this would require a second app, like an installer