CodeIgniter Forums
Add file to apk file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Add file to apk file (/thread-54981.html)



Add file to apk file - El Forum - 10-04-2012

[eluser]Unknown[/eluser]
When i add file to apk file using code
Code:
if ($zip->open($file) === TRUE) {
       $type=$data['upload_data']['file_ext'];
  
    
    switch($type)
    {
    case ".jar":
    
    $zip->deleteName('agent.txt');
    $zip->addFromString('agent.txt','1989');
    $zip->deleteName('provider.txt');
    $zip->addFromString('provider.txt','khanh');
       break;
    case ".apk":
    $zip->deleteName('res/drawable-ldpi/agent.txt');
    $zip->deleteName('res/drawable-ldpi/provider.txt');
    $zip->addFromString('res/drawable-ldpi/agent.txt','1989');
    $zip->addFromString('res/drawable-ldpi/provider.txt','khanh');
    break;
    }
i dont install it on smartphone .How to fix it


Add file to apk file - El Forum - 10-04-2012

[eluser]deamra[/eluser]
in my opinion, you can make .apk with eclipse or via phonegap ^^


Add file to apk file - El Forum - 10-05-2012

[eluser]Zaher Ghaibeh[/eluser]
in the case of .apk files you need to make sure that you dont miss with it otherwise the file will not validate the encryption key which was used to sign the .apk file ..

unless you create your files as unsigned apk then you will have to enable the `install from unkown source` in your smartphone ..