#26 2016-06-13 19:51:38

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,

Maybe you can try with the "startapp" plugin linked above:

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

Offline

#27 2016-06-13 21:55:18

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

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

+111111 for David   big_smile

Offline

#28 2016-06-13 22:19:50

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,

Thanks Samuel! Anyway, I am continue trying somethings... for example, this Cordova's plugin looks good, but unfortunatelly only can share images using remote URLs and only with the SMS messages application... they works, but only with absolute URLs and the SMS application and not others.

I want to try now with this other plugin (already mentioned above)...

Offline

#29 2016-06-13 22:30:05

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

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

Why on earth is it SO absolutely impossible to simply click on an image in android?  That is so messed up.

Not sure how to implement either of the above plugins but thank you so much for helping.

Mike

Offline

#30 2016-06-13 23:04:43

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 to all,

karmacomposer wrote:

Why on earth is it SO absolutely impossible to simply click on an image in android?  That is so messed up.

Not sure how to implement either of the above plugins but thank you so much for helping.

Mike

In my opinion it's completely reasonable to don't share images by default. Maybe a browser vendor think different, because an internet image is "by default" already public... but normally you don't expect to tap on an image in an application and then simply "share it" with others...

Anyway, I try with this refered Cordova's plugin and appear good: we can share images using their remote URL and also the application local URL. Then I carefully recommend you, Mike, to study that plugin, because they offer some customizable options that may you want to know.

For example, in order to share an image (and only an image) we can use a code like the below:

StartJS

 window.plugins.socialsharing.shareWithOptions({files: ['www/app/images/icon.png']}, function (success) {
   alert('Sucesfully shared!');
 },

 function (error) {
   alert('Error when sharing: ' + error);
 });

EndJS

In the above case we shared the application's icon, but we can refer to any other app's image file. The plugin is better than others, not only because they allow us to use app local files, but also because they always shown the shared dialog, so we can choose the application to use everytime we wanted to share the image.

The plugin also allow us to share other things, not only images. We can share text, URLs and more, so take a look at the [url=]plugin's website and read carefully their documentation. Below is a sample application who uses the plugin, and the Zip file includes also the APK file so you can take a look directly in your device:

shared_sample.zip

Take a look!

Offline

#31 2016-06-13 23:17:19

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

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

If I were to send you the entire project, would you be able to implement this on ONE category (I can then do it to the rest)?

Mike

Offline

#32 2016-06-13 23:25:44

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,

What you can't understand from my above attached sample?

Offline

#33 2016-06-13 23:31:35

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 pretty straightforward - however, one question.  How would I share the right picture with the right size?  Would I have to save a copy of each emoji at each size or can I do it programmatically?

Namely, emoji1_16_16.png, emoji1_32_32.png, emoji1_64_64.png, etc.

I would rather not do ALL that work - there are a lot of graphics and creating four or five sizes for each would be very tedious and time consuming - plus i'd have to load all of them into app builder with the file manager - would make for a very slow app.

If, however, we could use emoji1.png and set the width and height to be 16x16 or 32x32 or 64x64 that would be so much easier.

Can this be done?

Mike

Offline

#34 2016-06-13 23:36:11

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,

I am very sorry you can't get the point... so you can now share images, but don't want to prepare such images... then I really don't know what to say Mike. I don't think the application become "slow" if you add images on it. Maybe the the app's sizes increases, but no more. On the other hand, and (I hope) as you can see in the plugin's documentation, you can use remote URLs instead local images, then, if you wanted, use it!

Offline

#35 2016-06-13 23:41:22

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

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

David - you miss my point.  I am very pleased about this - it's a true solution.  However, I wanted to know if there is a quick and dirty way of managing various sizes of the graphics or do I have to do the work ahead of time and reference those.

If you look at it now, you can choose one of several sizes via a dropdown and then the app shows it - all using just one graphic.  If I have to save each graphic at each size, that one becomes 6 images - so 20 graphics becomes 120 graphics.  Across all categories, I may have to make 1,000 graphics.  Ugh.  If I don't have to, i'd rather not.

However, if the only way to do this is to link to a specific graphic, then i will  have to bite the bullet and re-size each one.  Perhaps I can find batch resizer software and do it almost automatically????

Either way, thank you SO MUCH for your help.  It's likely you found the true solution to this.

Mike

Offline

#36 2016-06-13 23:46:32

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,

No. There is no dirty way to manage various image sizes. You must provide an URL (local or remote) for an specific image, who have their specific size. Yes; maybe we can serve remote images in a dynamic way, but this implies to work with remote URLs, a remote server and remote scripts. Maybe you want to go ahead in this way or may you want to use local files. It's your choice.

The problem is you never can share the images in the way that you try at the principle. You let the browser to share it, wich is something completely different than using the Apache Cordova plugin. In fact, as you know, we need to use a plugin like that. You try for example by share an HTML IMG tag, which is something unaceptable. You really need to share files or URLs.

Starting by this... it's your choice to use remote URLs or local URLs. And prepare the things in order to deal with it.

Offline

#37 2016-06-13 23:52:12

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

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

So using what I already created, the user chooses a size and clicks on the graphic and that loads the detail page.

How would I use a if/then statement to put the name of the graphic in a variable and then use that variable to load the correct graphic?

For example, I choose baseball.png with a size of 32x32.  I need a if/then statement to store a string "baseball_32_32.png" and then load that in using the javascript you wrote on the detail page.

Psuedocode:

If "32x32" was chosen, then loadImage="baseball_32_32.png"

I would have to do this for each and every graphic.

The other possibilities would be "baseball_16_16.png", "baseball_64_64.png", "baseball_128_128.png", and "baseball_256_256.png"

So the name "baseball" and ".png" would be consistent.

Not sure how to do this in app builder.

Mike

Last edited by karmacomposer (2016-06-13 23:54:22)

Offline

#38 2016-06-14 00:15:41

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

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

I found a GREAT batch resizer with rename capability.  Creating the graphic sizes will not be a big deal.

http://www.axiomx.com/picsizer.htm

Mike

Last edited by karmacomposer (2016-06-14 00:15:58)

Offline

#39 2016-06-14 00:55: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,

When I share the file - which is 32x32 in size, it shares properly to, say, messager - but it comes in very large and blurry - as if it's sharing a much larger file.

StartJS

 window.plugins.socialsharing.shareWithOptions({files: ['www/app/images/sweet15_32_32.png']}, function (success) {
   alert('Sucesfully shared!');
 },

 function (error) {
   alert('Error when sharing: ' + error);
 });

EndJS

What am I doing wrong?

Mike

Offline

#40 2016-06-14 01:03: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 added a image control, added the image to be shared, resized it to 32x32 and then put the code above into it and no difference - the shared graphic was big and blurry.  I just don't get it.

I'm going to see what else you did in your example app and apk that maybe I missed.

Mike

Offline

#41 2016-06-14 01:06:17

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

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

Your example app, when installed on my phone and run, is doing the same thing - the example graphic is being shared at like 256x256 or larger regardless of the actual size of the graphic being shared.

Mike

Offline

#42 2016-06-14 01:44:29

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

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

Yeah, it's a big problem.  I created a 32pixel by 32pixel blue square in photoshop.  I called it blue.png

I added blue.png to the project and altered the above code to share blue.png

It shares fine, but comes in HUGE - like 256pixels by 256pixels.

I don't believe I did anything wrong, I just think its either a bug in the plugin or the messenger app (texting) on android is resizing it for some weird reason.

In any case, if i cannot send at size this solution won't work.  I have searched and searched for anyone with a similar problem, but have found none.  I texted my wife and the image she received was equally as large.

I wonder if there is a similar plugin but where sizes are taken into account?

Mike

Offline

#43 2016-06-14 03:39:39

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 we can't do too much in this case, because the "shared image" is shown by the application to use in their own way. For example, in my tests, the SMS application take the image and show a preview "as is", respecting the image size; GMail, however, shown me a larger image preview, the same than Twitter, which also offer the ability to apply some filters to the shared image.

However, we need to take in consideration that one thing is the application representation and other thing is the shared image. For example, GMail shown a larger image representation for the image preview, but finally the image than GMail attach to the email (in order to be shared) is the original image file, that is, have the size of the original image. So the shared file is correct, but their representation in the "shared application" depend on every "shared application".

Offline

#44 2016-06-14 04:43:53

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

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

You are correct.  The question is, will my client accept it?  It looks terrible when in the texting application the image looks horrible.

The best thing would be a way to copy and paste the image itself - I just do not know any way to do this.  I'll keep searching.

Mike

Offline

#45 2016-06-14 06:34:25

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

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

Check this out.  I uploaded several of the 16x16 graphics to my web server.  I went to the chrome browser on my phone and downloaded/shared a few of them.  I brought them into the messaging app and they ALL looked totally crappy.

It's not the plugin or app builder.  It's Android.  I guess there is NOTHING I can do about this.

I have NO idea how to break this to my client.  I am totally upset over this.  I had no idea Android was this bad with small images.

Mike

Offline

#46 2016-06-14 06:37:51

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

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

Ummmm.  Thought.  The one thing that looks PERFECT is the app icon.  I used the company logo of my client (which is round) and it looks gorgeous.  That was set in the app settings.

I wonder if it would be possible to use that same kind of interface to get small icons saved onto Android devices and retain their size?

I am sure it's not possible, but it vexes me that the icon can look so good and the rest cannot and they are all the same size.

Mike

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.