I've been working with the Facebook Android SDK for the past couple days, and while I have been able to post to my wall, one thing still stumps me: How can I fill the wall post dialog with information from my app?
For example, say you had an app that recorded hiking distance. When I launched the stream.publish dialog, I would want the text area under "What's on your mind?" to say something like "[User] hiked [distance] miles" instead of being blank.
I looked through the two samples included in the SDK, but neither address this. Is there a way to do this?
Thanks in advance!
I'm assuming you publish an attachment like - parameters.putString("attachment", publishingAttachment())
To add a message, just add the following line - parameters.putString("message", messageString);
Related
first of all I want to thank, because in this community I have found a lot of solutions to my development question. But this time I have a big one. I was looking for an answer to it in google and pdf´s and so on. But it's a complicated question and don't know how exactly ask for it in google. I new in app development. so here I go. I'm trying to do an app that shows the different recipes with photos and description like time that it takes and the difficulty and so.
explanation of the question
Apologize because the childish imagen to explain to you but you know (efficiency).
My two questions are:
1) How may I do to attach a description to an image. I mean, I want that the people can add their own recipes and of course I will make a formulary to this, but how may I do to when the people create the recipe that I suppose that it should be an object of a class, the TextView be attached to the bottom of the image automatically. in resume, that the image and the description with their elements be one unique element. I have tried to encapsulate the image and the text view in one layout, but in this case I don't know how to create a new layout once the app is running. ok the user fill the formulary but how to create a new layout on the run. I don't know how to solve this.
2) How may I do to change in the description of the image the quantity of red tomatoes. I mean. if the recipe have 3 in difficulty, 3 of 5, this is settled by the user, but how I do to show 3 red tomatoes of 5 and the other showed in gray?
I know you may say "another Newby" but I have realized that I love programming and in El Salvador (Central America) there´s almost any information about this subject. Again, thanks a lot.
one way to achieve that is by using Recycler view. and every time a user adds an item. you can add it to the list and the system will draw a new item for you.
check this tutorial
let me know if this helps or you need more explanation
I have a telegram bot, to create used library TelegramBots
Bot show post with text and image. The post looks like this:
When you press the inline buttons text of post changed (I used for this EditMessageCaption) , but I can not change the picture.
Does anyone know how to change the picture of message with image?
I found a solution, the picture can not be changed, but you can just paste the url into the text and change it.
Description
Tool:
Android 4.2+, Jelly Bean, API level 17
I started android programming a couple of hours ago and I can set a random text, but the color don't changing (text and background, too). I use the same logic, what was right at the text modifying, but something went wrong.
Activity content
ColorWheel content
Okay, I tested on an AVD device, and it's working! I don't understand this.... my phone will be crash or stupid?? (I really care the correct API level, so I don't know what's the problem..)
But the point is the code is right.
Thanks for helping!
P.S.: next time i will use the code, not the picture.
I want to capture the pointer locations in whole android device by providing a service to develop something like Pointer Location in Developer options .
First I have tried addingoverlay view which is always on top to capture the coordinates . but this method didn't let me to get touch events in move actions .
So I decided to try another way . At last I found that for rooted devices , we can get touch events but I don't know how . Could you please give some suggestions ?
thanks in advance
I have been looking for this answer as well. Can you specify how you did the overlay view and captured the coordinates?
I was able to do the overlay as well, with some other answers from here on stackOverFlow, but if I capture the Overlay coordinates, it renders the background/OS useless. Its one or the other, not an actual service in the background running or an overlay recording coords. Its one, or the other.
I have read that this goes against the Android security framework, since it would be a really big flaw when exploited. Although, everything that I have read is from 2012 at the earliest. This is the newest post in 3 years. Any insight?
Here's my code:
AdsManagerOptions options = AdsManagerOptions.newInstance();
options.setMaxAdsOnMap(1);
AdsManager ads = AdsManager.newInstance(map, "google");
ads.setEnabled(true);
I tried doing this before the map is added to a panel, after a map is added to a panel, and any other way i could think of that could possibly make sense. My publisher id is "google" because I havent been approved for adsense yet, but ive tried taking a real publisher id and i got the same result.
What is confusing me a bit, is that the AdsManager isnt a widget, so I cant choose where i want to place it on the map. Ive read that this is actually how it works, but ive seen sites like http://mapper.acme.com/ where the ads are not in the typical bottom right corner.
Can someone PLEASE enlighten me on what I am doing wrong because this is driving me mad! Thanks!
I still have no answer. I am now trying with a legitimate publisher ID so I know that an invalid publisher id wasnt the reason for my frustrations. Anyone have any ideas?
Are you using firefox? If yes, do you have adblock on? Or any other adblocker on your browser?
Its also possible that the region you're looking at doesn't have any ads... Try zooming into a place like New York...