Apptimize - Modifiable Text / Images in app - android

Within our application, our product designer would like the in app text and images be changeable via Apptimize.
We have a tutorial with 5 screens, each with a description and image.
Currently, for the text, I have an Array of 5 Strings, and use Apptimize's AppTimizeVar to get a value.
// Either use the already existing string, of the one from Apptimize.
description[i] = ApptimizeVar.createString( "tutorial_description_" + i, description[i]).value();
And for the images, I was going to create an Array of 5 Strings that may or may not contain URLs to an Image to replace that image.
This solution may work, but I'm wondering. Is there a better way to accomplish this goal?
Also, I wanted to get someone's opinion on if this is the right path to follow. Trying to make things changeable down the road via a third party library like Apptimize.
Thanks for your time.

Related

How to change image display duration in VLC lists for Android?

I have set this duration for lists on Windows over the setting 'demuxer', however the android version does not contain this option.
I'm actually creating the list dynamically over a php file in a server, so it looks like this:
#EXTM3U
#EXTINF:-1,
image1.png
#EXTINF:-1,
video1.m4v
So I wonder if there is an option in android to make images (not videos) display over a minute and if there is no such option, maybe I can add something to the list to make images display longer?
I have seen a tutorial for the list to use 1000 but it is a tag based language (html?), which seems not to be the case of my list. (link to tutorial: http://chris-reilly.org/blog/vlc-slideshow-duration/)
It is worth mentioning that in the Android version there is a small input for VLClib, but I was unable to find anything related to what I'm looking for.
Any help will be appreciated.
The answer is #EXTVLCOPT:image-duration=100 after each image file. (change 100 for the number of seconds.
Found in https://forum.videolan.org/viewtopic.php?t=148945

Best way to load ~500 paragraphs plus options

I'm just getting started and trying to make a simple app after going through some of the Google Codelabs. I wrote a Choose your own Adventure type of game. It consists of 500 paragraphs, and at the end of each paragraph is usually a choice of the next action to take (ie paragraph to load) and possibly some game logic. For now I am concentrating on the text only.
It seems simpler to make 500 text files and load up whatever file number is necessary, however it makes more sense to load ALL the paragraphs as the entire text takes up roughly 300Kb as a text file.
How would I even attempt this? I know I would need a text array and I file reader. I think it would be more work to format the paragraphs with a delineator to separate them, as it may be simpler to just create 500 files and write a While loop feeding my array.
That should fulfill my current objective, but when I want to add the choices at the end of the paragraphs, it seems as if a JSON or XML file that includes the text and choices would be better. I could not figure out how to even attempt this.
Example Paragraph: "You hear a horseman galloping and spin towards the sound. Do you have the skill of Forest Stealth? If you do, turn to 95. If you do not, turn to 234."

Can we add a invisible image watermark to another image in Android? If yes then how?

I need the code to add invisible watermark to another image in Android
As the comments mentioned, Stackoverflow isn't a free coding service. I will provide you with a high level design advice from which you can implement your own code.
Invisible watermark could just be metadata. The point is to make your particular photo unique and identifiable, right? I would recommend you looking into image metadata manipulation for a simple solution.
That being said, if you are looking for some high tech stealthy watermarking, then you might be looking for pixel manipulation. You can change a few of the pixel colors so if it's compared with the original image with the naked eye, it looks identical but if compared with their base64 encoding you can see a difference. Simply create your own pattern as some sort of signature to attach to images to identify them.
Both method allows you to determine if an image is yours due to the "watermark" you leave on it.

Android ~ Listview with images that have been uploaded by user?

I know how to setup a listview to have an image and some text on each rows.
I know how to have the user open up a dialogue to pick an image from the file system or live.
I almost know how to downsample it in case its huge. (too many ways, no expert to recommend one).
I really need to know how the user can create db entries (notes) that contain text and an image that is user selected. In essence, the user is entering text and selecting/uploading an image that makes a 'note' and the notes get displayed in a listview.
I don't want the full code, but rather a general direction. I did some research and for me its a big forest. If you can give general directions how thats done, I'll do the rest.
Thank you,

How to achieve following on placeholder image in ImageView Android like Pinterest?

I have used Picasso in my Android Application which has many images. Its working and looking good. I am trying to make UI more of simple and user friendly. I have placeholder for my imageviews before actual image loads. But its white color. I want to placeholder image depending on main color of image like pinterest.
Pinterest placeholder images before main image loads. Following screenshot:
And after image loads it shows proper image based on main background color shown for placeholder:
Is it possible to achieve in Picasso library provided by Square or whats the way to achieve.
Please help.
Bit late but for other readers that want to accomplish a similar thing, I'll just leave this here. I don't know how Pinterest did/does it, probably developed their own implementation. But Google updated the v7 support library with 'Palette' which is a new API which allows you to extract prominent colours from images when provided with an Image Bitmap.
Edit: Something I just realised that this probably doesn't help for placeholders since you need an image to actually get colours from! So my best guess is that Pinterest does the colour extraction from the server and includes the colour in the (presumably) JSON response that is sent to the client.
I haven't used it much myself but it works quite well from what I've seen/read. You can read up more about it at these two places:
Developer Docs
Tutorial/Explanation (Willow Tree Apps)
You can only do that by saving the prominent color from the image while saving it in your database & then retrieving it for later use.
https://pypi.org/project/extcolors/ is a very easy to use python library that extracts the colors for you given an image.
Or you could you https://github.com/woltapp/blurhash a library that'll give you this.
Both ways, you'll have to first save the BlurHash or The color as a metadata in your database, and then when the user requests the data, you'll send either of those and display them till the data is fully downloaded.

Categories

Resources