Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-app message type "Text" - How to make markdown images work? #2

Open
ericntd opened this issue Aug 22, 2016 · 0 comments
Open

In-app message type "Text" - How to make markdown images work? #2

ericntd opened this issue Aug 22, 2016 · 0 comments

Comments

@ericntd
Copy link

ericntd commented Aug 22, 2016

Interestingly, everything renders fine in your admin UI.
Also, I've tried HTTPS image URLs and they image work.
The images don't show if when HTTP image URLs are used.

The markdown text:

----------
![First image](http://i.imgur.com/4AiXzf8.jpg)
![Second image](http://i.imgur.com/Q16DJgN.jpg)

## Dependencies

### Android Libraries

[**Card View**](http://developer.android.com/tools/support-library/features.html#v7-cardview)

[**Recycler View**](http://developer.android.com/tools/support-library/features.html#v7-recyclerview)

[**Design Support Library**](http://developer.android.com/tools/support-library/features.html#design)

[**Android Data Binding**](https://developer.android.com/tools/data-binding/guide.html)

### Third Party Libraries

[**Android SwipeableRecyclerView**](https://github.com/brnunes/SwipeableRecyclerView) by Bruno R. Nunes is used to implement a swipe to dismiss UI on Messages.

[**Picasso**](https://github.com/square/picasso) by Square for asynchronous loading of Message images.

### Importing Modules Into Your Application

In your Android Studio project open up the project structure window (`File > Project Structure`) and add a new module. Choose `Import Gradle Project` and provide the path to the native stream module from Carnival Native Streams repository that you want to use. This will copy it into your project and also adds the `CarnivalUtils` module that the Stream uses.

I understand you never stated Markdown support. However, I'm very close to achieving my goal - display multiple images in the message here. Could you help me here?
I've already investigated your MessageActivity and found the HTML <img /> tag still there in the message's HTML text after this line this.mMessage = Carnival.getInstance().getCachedMessage(messageId).

How it looks like in the app's message view (MessageActivity):
native stream message view
How it looks in your admin web UI:
screen shot 2016-08-22 at 5 18 10 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant