#1 2016-06-13 14:30:51

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Which Android .bat file do I choose to run?

OK, so I followed the guide listed here for Cordova.  I have everything installed and all have version numbers, so they work.  The Android adb is running and I followed all directions on what to install.

So, now what do i do?

Which .bat to I run?

I have three to choose from - debug, release and run.

I just need some hand holding getting my first app builder app to become a Android apk file.

Does App Builder sign them?  What about the password protection I read about in the Android Studio apk guide?

I could not install Android Studio - the download kept failing.  I did download and install the Android SDK, however.

Thank you.

Mike

Last edited by karmacomposer (2016-06-13 14:32:23)

Offline

#2 2016-06-13 15:22:37

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

Certainly we have three differents BAT files, here is their purpose:

1º "Debug": Allow us to get an APK file for our application ready to be debugged in a device or emulator.

2º "Run": If we have attached our device to our computer, this BAT launch the application directly in that device.

3º "Release": This BAT creates an aligned APK file of our application ready to be signed and then deployed into the store.

How to sign our APK files to be published in the Google Play Store? Take look at this forum's thread.

Offline

#3 2016-06-13 17:10:50

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

OK.  I see. 

I was able to make a debug apk with no problem.

The only real problem I am having now is that when I run the app in Android after installing it, the app works fine, but the important image is not clickable in the HTML.  I added a blank <a href="">then the image</a>.

The result works in windows when I test but DOES NOT WORK in Android as a Cordova app.

How can I make the image clickable in Android?

Mike

Last edited by karmacomposer (2016-06-13 17:11:58)

Offline

#4 2016-06-13 17:20:51

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

It's very difficult to help without more information. Can you please provide me a little application in which I can take a look?

Offline

#5 2016-06-13 17:41:57

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

I just sent you an email through here with a link to the debug app.

Mike

Offline

#6 2016-06-13 17:45:19

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

It seems that this may be what I need:

Send Binary Content

Binary data is shared using the ACTION_SEND action combined with setting the appropriate MIME type and placing the URI to the data in an extra named EXTRA_STREAM. This is commonly used to share an image but can be used to share any type of binary content:

Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, uriToImage);
shareIntent.setType("image/jpeg");
startActivity(Intent.createChooser(shareIntent, getResources().getText(R.string.send_to)));

What do you think?  Is this something available in app builder?

I got this from here:

https://developer.android.com/training/ … /send.html

Mike

Last edited by karmacomposer (2016-06-13 17:47:42)

Offline

#7 2016-06-13 18:07:00

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

After take a look at your application I understand what you wanted. Then I prepare a little application who uses an Image control and also an HTML control in order to shown the same image. I try with the HTML control in both ways: without an "A" tag and with an "A" tag for the image. Certainly the things does not happend than you expected, Mike, but, I think it's very reasonable.

We can react to image "clicks" (or "taps") in both cases: the Image control and the HTML control. But we can't expect something like a "share" dialog to appear when we tap along an image or other resources in an application, not only your application, but any application. These applications images cannot be "shared" by default.

About your proposed code and documentation, you can't simply use Java code in App Builder, except if you are capable to create a plugin for Apache Cordova: then you can use the Java code of the plugin from App Builder using the plugin's Javascript API. Certainly this is probably the way for a solution: uses a Cordova plugin.

But I am not sure if a plugin like that is already created, or maybe we can use someone like this or this other.

Offline

#8 2016-06-13 18:26:25

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

As an HTML5 site on a phone, it works 100%.  You long press the image and a menu comes up.  SHARE is one of the options.

As a cordova app, this goes away.  You cannot SHARE and no menu comes up.

I need to share the emoji with whatever apps allow sharing.

How can I accomplish this?  I need to finish this ASAP.

Would you be able to help using that 1st Cordova plugin (the file sharing one) you linked to?

Could you add that to app builder and show me how to utilize it?

In the end, no matter how I do it, whether it be a html report, a image control - I don't really care what - I need, in the end, the user to be able to share or copy and paste, the image into another app on their phone.

How can I get this done - today if possible?

Mike

Last edited by karmacomposer (2016-06-13 18:26:57)

Offline

#9 2016-06-13 18:32:06

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

As an HTML5 app on a phone it may works because your application is running inside a browser: it's the browser who offer you a share dialog for the image, as well they does if you tab a link or certain other elements. However, when your application is running in Apache Cordova, there is any browser, but the application is running in a "WebView", based in Chrome, but not the Chrome browser itself.

I am try to help you already Mike. I try with an HTML control and an Image control. I try by put the image in an IFrame control. I try with one of the above linked plugins (lamp), I try with the "OpenWindow" action by using the Browser plugin: and unfortunatelly any of these approachs works as you expected.

Maybe a possible way is to use the image URL along the Clipboard control. But I am not sure if this approach can work, in the first place, and if can satisfy you, in the second place, because in this case we are not sharing an image "in a binary way", but just an image URL.

Offline

#10 2016-06-13 18:34:39

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

David,

I TOTALLY appreciate your help.  Please know that I feel your support is excellent.

Is there a way to initiate a browser in the detail scene?  If it runs in a browser, then it should work, right?

If not, how would I utilize the clipboard control on the detail scene?

Mike

Offline

#11 2016-06-13 18:41:13

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

I think you can't initiates the browser in the "detail scene", if for that you understand an app's view. I the first place, how we knows the browser that we wanted is available? Also, how we knows if the default browser support something like "share images"?

Maybe you can stufy the usage of the "com.lampa.startapp" plugin:

https://github.com/lampaa/com.lampa.startapp

They allow us to launch "intents". I try it without success, but maybe I am not doing everyting well. On the other hand, I am not sure if we can "share" an URL of our application... then probably you need to provide "served side" images...

About the Clipboard, App Builder includes the Clipboard sample, so you can take a look. In fact we only need to call to theh CopyToClipboard action.

Offline

#12 2016-06-13 18:46:14

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

David,

OK, so I added a clipboard control to one of the detail scenes and a button to 'copy' it.

I KNOW this is wrong, but how would I format this to work with the Clipboard copy button:

// Just do it!
SetVar "[CutAfterCopy]" "false" "String"
CopyToClipboard "clipboardBirthday" "<img height="[selectSizeBirthday]" width="[selectSizeBirthday]" ng-src="[reportBirthday.Record.ImageUrl]"/>"

I just need the correct syntax.

Mike

Offline

#13 2016-06-13 18:48:21

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello,

CopyToClipboard "clipboardBirthday" "<img height='[selectSizeBirthday]' width='[selectSizeBirthday]' src='[reportBirthday.Record.ImageUrl]'/>"

But, certainly I am not sure the objective of copy an HTML tag into the clipboard... on the other hand, remember the image URL is part of your application, and not accesible out of the application, therefore, even if you can copy the image tag, the URL of the image can't work...

Offline

#14 2016-06-13 18:59:30

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

David,

How could we use this plugin in app builder:

https://github.com/agomezmoron/cordova- … ge-gallery

I think this may be it.

Save the image to the gallery and then from there the user can copy and paste it any way they want.

Mike

Last edited by karmacomposer (2016-06-13 19:00:08)

Offline

#15 2016-06-13 19:02:29

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

App Builder includes a tutorial and varios samples about how we can use Cordova plugins. Basically this plugins offer to us a Javascript API we can use. In principle, all the Cordova plugins can be used, then, try it and ask if you have some particular problem.

Offline

#16 2016-06-13 19:03:07

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

Actually, this one allows for HTML5 to gallery - so I can change the size on the fly:

https://github.com/devgeeks/Canvas2ImagePlugin

Mike

Offline

#17 2016-06-13 19:04:40

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

David,

My problem is i've tried to add a Cordova plugin and none have worked for me.  I'm not sure what i'm doing wrong, but anyway, tell me how I can use the last one I linked to in my app.

I know, I know - install the cordova plugin and then code it.

I'm under the gun here - any other help is appreciated.

Mike

Offline

#18 2016-06-13 19:06:12

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

Sorry, but I am right now trying another possible solution for your problem... maybe you can understand I only had a couple of hands. But anyway, I can't study a plugin API for you, Mike: I provide you tutorials and samples in App Builder to do that. If you have some specific problem, ask here for help.

Offline

#19 2016-06-13 19:13:16

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

According to the Cordova plugin instructions, I am supposed to find something like com.jsmobile.plugins.sms

Instead, they reference the following:

### For Cordova 3.0.x:

1. To add this plugin just type: `cordova plugin add https://github.com/devgeeks/Canvas2ImagePlugin.git` or `phonegap local plugin add https://github.com/devgeeks/Canvas2ImagePlugin.git`
2. To remove this plugin type: `cordova plugin remove org.devgeeks.Canvas2ImagePlugin` or `phonegap local plugin remove org.devgeeks.Canvas2ImagePlugin`

### NOTE: For older versions of Cordova (You will probably have to use tag 0.2.0)

How do I find out the com.whatever.plugin.whatever?

Would it be org.devgeeks.Canvas2ImagePlugin?

Mike

Last edited by karmacomposer (2016-06-13 19:14:02)

Offline

#20 2016-06-13 19:15:14

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

I don't think such plugin can help here... but anyway (please, read this tutorial) we need to use the ID "https://github.com/devgeeks/Canvas2ImagePlugin.git" in order to use that plugin.

Offline

#21 2016-06-13 19:19:57

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

I know.  I've read that tutorial probably 20 times now.  I just cannot get it.

What would YOU DO if a client asked you to create exactly what I am trying to create.

Remember, I am very new to your app builder and to app building in general.  While I am a database programmer and do some light game programming in other languages, I am just not proficient in cordova and this kind of app building.

I really do appreciate your help, but I just want to finish this darn thing already.

Mike

Offline

#22 2016-06-13 19:24:37

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

If a client ask me for something like that (knowing what I know already) I reply we can't use App Builder (nor any Cordova based application) to do that, except if we firstly found a developer who can create some kind of Cordova plugin to do the background task, if possible... Of course anybody can say to any client that anything is possible... but this is not truth nor honest.

If we can share URLs instead of images, then maybe we can go ahead, but:

1º Probably such images must be available in a remote server, to share useful URLs.

2º I am not sure if only sharing an URL can be sufficient, but probably not, to be honest.

I am sorry, Mike, but I tried several possible solutions and anyone convince me or finally works as you expected.

Offline

#23 2016-06-13 19:26:43

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

David,

Let me ask you, how would I simply open a browser window in app studio?

If I could open up a browser window, then the image would be clickable/shareable, etc, right?

Is there a browser control in app studio?

Mike

Offline

#24 2016-06-13 19:27:57

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Which Android .bat file do I choose to run?

Hello Mike,

I am sorry, but I don't know "app studio"...

Offline

#25 2016-06-13 19:34:44

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

Re: Which Android .bat file do I choose to run?

I meant your app builder software.  Sorry.  I actually do have a program called app studio (NSB App Studio), but I chose your software to create this.

My brain is scrambled.

Mike

Last edited by karmacomposer (2016-06-13 19:38:16)

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.