Agreed regarding "explicitly ennumerated in the provisioning of the app" I 
do this. These apps will not be published VIA Apple for our current 
business model.

Please advise the classes needed to save a file in the android public 
downloads directory.

Regards.

On Saturday, July 25, 2020 at 10:10:27 PM UTC-4, Shai Almog wrote:
>
> We literally use CN.execute(url_of_app). Where the URL is an HTTP URL that 
> contains the application. 
> No magic, no native code. 
>
> The one thing you might have gotten wrong is the HTTP hosting. You need to 
> make sure your server is HTTPS and that it has the right mime types for the 
> links.
>
> But again, you'll only be able to do this on Android. On iOS you can't 
> even distribute an app without going through the store.
>
> On Saturday, July 25, 2020 at 3:21:42 PM UTC+3 [email protected] 
> wrote:
>
>> Using codenameone build app, I can download the .apk file to the public 
>> downloads directory.
>> Then using file manager can open the downloads directory, tap the .apk 
>> file and install it.
>>
>> Please see attached pic "Screenshot_20200725-081618_File Manager.jpg"
>>
>> I want to replicate this.
>>
>> Please advise
>>
>> Regards.
>>
>> On Saturday, July 25, 2020 at 8:03:44 AM UTC-4, Mark Bolduc wrote:
>>>
>>> Thanks, perhaps I can make this request simpler. (I don't have any near 
>>> future requirements of publishing my apps with google or apple)
>>> So with all due respect to Apple, I am not interested in what apple will 
>>> accept.
>>>
>>> I have it stuck in my head that an .apk & .ipa file is an installer and 
>>> executing it (from what ever means is needed) will be verbose and open up 
>>> dialogs to ask user for needed permissions to access photos, caners, audio 
>>> etc.
>>>
>>> I believe if I can save an .apk (Android) file in the (android native 
>>> method: "ExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)"), 
>>> I can then open a browser pointed to the downloads directory and execute 
>>> the installer for that app. This should work for .ipa & .apk files.
>>>
>>> Or just dialog the user with instructions.
>>>
>>> So in codenameone, how do I access the public downloads directory for read 
>>> & write?
>>> My App already downloads the .apk & .iap files and saves it in the 
>>> "FileSystemStorage.getInstance().getAppHomePath() + 
>>> "A3-TECH/A3-TechAppDownloads/"
>>> So I don't see how to access the public downloads directory.
>>>
>>> Best Regards.
>>>
>>>
>>> On Saturday, July 25, 2020 at 1:42:07 AM UTC-4, Shai Almog wrote:
>>>>
>>>> You can't do that on iOS. Codename One build which just uses a web 
>>>> download URL was rejected by appstore review so iOS won't let you do that 
>>>> at all.
>>>> On Android you can do that but it would require a lot of permissions 
>>>> you honestly don't want to ask for. You're better off letting the default 
>>>> app walk the user through those things.
>>>>
>>>> On Friday, July 24, 2020 at 4:45:31 PM UTC+3 [email protected] 
>>>> wrote:
>>>>
>>>>> Alternatively I found this for Android:
>>>>>
>>>>> https://stackoverflow.com/questions/35799567/activity-not-found-using-codename-one-native-code-for-android/35809854#35809854
>>>>>
>>>>> public String getDownloadPath() {
>>>>>     return 
>>>>> Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath()
>>>>>  + File.separator + "myfolder";}
>>>>>
>>>>> How do I programmatically access (for read & write) the downloads 
>>>>> directory?
>>>>>
>>>>> On Friday, July 24, 2020 at 9:08:02 AM UTC-4, Mark Bolduc wrote:
>>>>>>
>>>>>> There has to be a way to trigger an install from the .apk and .ipa 
>>>>>> files within codenameone.
>>>>>>
>>>>>> Using Display.getInstance().execute(???) what process or browser or 
>>>>>> app can I execute and have it point to the .apk or .ipa file?
>>>>>>
>>>>>> The devices download the app and store them in the downloads 
>>>>>> directory, If I browse that directory I can tap the .apk or .iap file 
>>>>>> and 
>>>>>> it will install.
>>>>>>
>>>>>> I want to do this programmatically.
>>>>>>
>>>>>> How can my app save a file on the devices downloads directory?
>>>>>>
>>>>>> Regards.
>>>>>>
>>>>>>
>>>>>> On Friday, July 24, 2020 at 12:59:57 AM UTC-4, Shai Almog wrote:
>>>>>>>
>>>>>>> As I said we don't download. We call the URL on the web and the 
>>>>>>> native download sequence performs the actual download process. The 
>>>>>>> execute 
>>>>>>> method accepts an https URL in our servers. 
>>>>>>>
>>>>>>> Look at the result of our iOS builds in the browser and inspect the 
>>>>>>> code. It's an HTML page that points at an XML file that's the manifest.
>>>>>>>
>>>>>>> On Thursday, July 23, 2020 at 3:09:37 PM UTC+3 
>>>>>>> [email protected] wrote:
>>>>>>>
>>>>>>>> You mentioned pointing the execute process to a manifest, how does 
>>>>>>>> this work?
>>>>>>>>
>>>>>>>> Curious, when an .apk file exists in the devices download 
>>>>>>>> directory, from a file browser, we can click on it and it installs.
>>>>>>>>
>>>>>>>> On Thursday, July 23, 2020 at 7:06:15 AM UTC-4, Mark Bolduc wrote:
>>>>>>>>>
>>>>>>>>> Thanks, I have downloaded the .apk file to the mobile device and 
>>>>>>>>> did call:
>>>>>>>>>
>>>>>>>>> Display.getInstance().execute(ApplicationBinariesDownloadPath + 
>>>>>>>>> fileName, e -> {
>>>>>>>>>                 System.out.println("saveAndInstallA3MobileApp 
>>>>>>>>> Complete");
>>>>>>>>>             });
>>>>>>>>>
>>>>>>>>> Can you provide the code syntax to install the .apk or .ipa file 
>>>>>>>>> that is stored on the mobile device?
>>>>>>>>>
>>>>>>>>> BTW: I have no intention of publishing my apps at this stage.
>>>>>>>>>
>>>>>>>>> Also, Google made life a lot more complex by requiring a privacy 
>>>>>>>>> policy be hosted if you access things like camera etc.
>>>>>>>>>
>>>>>>>>> On Wednesday, July 22, 2020 at 10:53:59 PM UTC-4, Shai Almog wrote:
>>>>>>>>>>
>>>>>>>>>> We don't download the files. We launch an external download 
>>>>>>>>>> process using execute(url). We also don't point at the IPA but 
>>>>>>>>>> rather at a 
>>>>>>>>>> manifest.
>>>>>>>>>> Regardless Apple won't approve your app if you do that. Which is 
>>>>>>>>>> why Codename One Build only works as a web app for iOS which IMO is 
>>>>>>>>>> pretty 
>>>>>>>>>> stupid.
>>>>>>>>>>
>>>>>>>>>> On Wednesday, July 22, 2020 at 8:27:27 PM UTC+3 
>>>>>>>>>> [email protected] wrote:
>>>>>>>>>>
>>>>>>>>>>> It sound like you've stored them on the downloads directory of 
>>>>>>>>>>> your PC.  You need to download them
>>>>>>>>>>> directly onto your mobile devices, which ought to trigger the 
>>>>>>>>>>> installation.
>>>>>>>>>>>
>>>>>>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/4ccb00db-2e3c-4ca7-91e5-b57d9e08c1b3o%40googlegroups.com.

Reply via email to