×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    285

    Sharing API seem to cut off HashTag

    Hello developers,

    I use the new Asha Sharing API the let the user share a "result"-string.
    I contruct the result string in memory.

    When I add a hashtag at the end, like "mymessage #HandylearnCounter", the end will be cut off.
    The start of the string will be shared, bat the hashtag is not included.

    When I remove the "#", everythings works.
    I see this behaviour with twitter and message as sharing endpoints.
    My code is quite similar to the offical example code

    Code:
            try {
                Registry registry = Registry.getRegistry(midlet.getClass().getName());
                String mime = "text/plain";
                Invocation invocation = new Invocation(null, mime, "com.nokia.share");
                invocation.setAction("share");
    
                String text = model.getShareBody();
                String arg0 = "text=" + text;
                System.out.println(text);
                String args[] = {arg0};            
                invocation.setArgs(args);         
                
                invocation.setResponseRequired(false);
                registry.invoke(invocation);
                
            } catch (IllegalArgumentException ex) {
                ex.printStackTrace();
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (SecurityException ex) {
                ex.printStackTrace();
            }
    Is the some special magic for the handling of the text in the sharing API?

    Regards

    Karsten Meier

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,752

    Re: Sharing API seem to cut off HashTag

    You may consider trying with various encodings, like %23 (URL-encoding), # (HTML entity), and whatever else pops into your mind.
    Rationale behind:
    - the thing happens in HTTP environment, where # has a special meaning
    - also, the documentation mentions key-value pairs, like the "text="+text in your code. Now if those key-value pairs are parsed with the standard Properties parser, # may mark a comment, and then the rest of the line is ignored.

  3. #3
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    285

    Re: Sharing API seem to cut off HashTag

    Thanks.

    So far I had no luck.
    A %23 will also be cut off.

    This means that it also happens to user input, after a hash the rest will be cut off. This also happens in the official example app "Status Shout"

    Looks like I found a problem in the spec/implementation, as users of Twitters use hashes very often inside their tweets.

    Regards

    Karsten Meier

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: Sharing API seem to cut off HashTag

    Try the mime type */*
    Heard of DVLUP? Join here

  5. #5
    Registered User
    Join Date
    Mar 2014
    Posts
    4

    Re: Sharing API seem to cut off HashTag

    Did you find a solution? I have the same problem.

  6. #6
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    285

    Re: Sharing API seem to cut off HashTag

    No, I found no solution. I gave up after a few tries. I think this need to be solved on Nokia side.

    Regards

    Karsten Meier

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: Sharing API seem to cut off HashTag

    @internetlabor Have you opened a support ticket for that?
    Heard of DVLUP? Join here

  8. #8
    Registered User
    Join Date
    Mar 2014
    Posts
    4

    Re: Sharing API seem to cut off HashTag

    Thanks for the answer. Most likely you are right but will test something and if I find solution, will inform you.

    Quote Originally Posted by internetlabor View Post
    No, I found no solution. I gave up after a few tries. I think this need to be solved on Nokia side.

    Regards

    Karsten Meier

  9. #9
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    285

    Re: Sharing API seem to cut off HashTag

    @shai.i

    No.I have not filed support case. I have two free support cases as premium developer, and this issue was not important enough for me.
    But of course it is unfortune, as sharing without twitter hashtags makes not much sense. It is a pitty, as the Sharing API is otherwise a good thing.

    Sorry for delay. I currently not developing for Nokia.

    Regards

    Karsten Meier

  10. #10
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: Sharing API seem to cut off HashTag

    You can report it as a bug, the support tickets are for personal technical support.
    This link http://www.developer.nokia.com/bugs/ used to work before the new site design but now it redirects you to the support section.

    maybe @BuildNokia knows where this link section went to....
    Heard of DVLUP? Join here

  11. #11
    Registered User
    Join Date
    Mar 2014
    Posts
    4

    Re: Sharing API seem to cut off HashTag

    Quote Originally Posted by shai.i View Post
    You can report it as a bug, the support tickets are for personal technical support.
    This link http://www.developer.nokia.com/bugs/ used to work before the new site design but now it redirects you to the support section.

    maybe @BuildNokia knows where this link section went to....
    Maybe this url? http://developer.nokia.com/contact/dev-feedback

    I sent a link to this discussion from that developer feedback page.

  12. #12
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    37

    Re: Sharing API seem to cut off HashTag

    Hi all,

    This is a known issue and it is already fixed. The fix should be there in devices supporting this API. In which device you have had this issue? What is the sw version in the device?

  13. #13
    Registered User
    Join Date
    Mar 2014
    Posts
    4

    Re: Sharing API seem to cut off HashTag

    Quote Originally Posted by jarmlaht View Post
    Hi all,

    This is a known issue and it is already fixed. The fix should be there in devices supporting this API. In which device you have had this issue? What is the sw version in the device?
    Asha 503 with Nokia Asha 12.1.6. Also issue appears when using emulator.

    Just noticed there is SDK 1.2 available, will test that.

  14. #14
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    37

    Re: Sharing API seem to cut off HashTag

    Works in Nokia Asha SDK 1.2 (beta), it is based on 14.0.1 software. I'm not sure, if there is already update available for the devices.

Similar Threads

  1. N81-N91 sharing via wifi
    By iliyas06 in forum Wired and Wireless interfaces (Closed)
    Replies: 0
    Last Post: 2008-12-14, 09:28
  2. Sharing SID
    By saji_iq in forum Symbian
    Replies: 2
    Last Post: 2008-10-13, 13:00
  3. How to use Video Sharing on N95 (S60 3.1)?
    By ayog in forum Streaming and Video
    Replies: 1
    Last Post: 2008-09-03, 05:02
  4. sharing my sis file..how to do??
    By rafeeqpv in forum Symbian
    Replies: 3
    Last Post: 2007-04-13, 16:03
  5. RFbsSession Sharing
    By FloydFan in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-10-19, 12:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×