IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation

 View Only
  • 1.  Using the camera

    Posted 03/10/14 10:03 AM

    Hi all,

    I’m new to this community and to programming in software AG.
    There for, the solution to my question can be easy but i realy don’t find it.

    In my app, i need to take a picture with the camera.
    But i have no idea how to open the camera view, and make the picture…

    Is there a good example code anywhere…?

    Thnx in advance.

    Ken


    #webMethods-General
    #mobile
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Using the camera

    Posted 03/10/14 03:38 PM

    check the Java API at:
    com.softwareag.mobile.runtime.media.CameraHandler

    getCameraSnapshot method etc.
    the document is under:
    _documentation\webMethods\Mobile_Designer\9-0-SP1_Mobile_Designer_Java_API_Reference


    #webMethods
    #webMethods-General
    #mobile
    #Integration-Server-and-ESB


  • 3.  RE: Using the camera

    Posted 03/11/14 06:16 AM

    Correct me if im wrong.
    But as far as i understand the API,

    • First i need te make a new object of the class “CameraHandler”
    • Then i need te connect te handler to my canvas.
    • Then i use the function “createCamera()” to set my camera

    And then i shoud see the videostream of the camera on the screen…?

    Because all i get is al black screen from the code below

    
    public class CameraView extends nUIViewDisplay{
    public CameraView (MyCanvas controller, ExpenseItem current_expense)
    {
    super (Constants.NUIID_SETTINGS_VIEW);
    this.controller = controller;
    
    if(current_expense!=null)
    setHeadertext ("Photo: "+current_expense.getName());
    else
    setHeadertext ("Photo: New expense");
    
    CameraHandler camera = new CameraHandler();
    camera.initCamera(controller);
    camera.createCamera();
    camera.getCameraSnapshot("PNG", 100, 100);
    
    // Button to go back
    add(new nUINavbuttonElement(Constants.NUIID_BACK_PHOTO_VIEW, Util.getString(Parameters.TEXTID_BUTTON_BACK), nUINavbuttonElement.TYPE_BACK, null));
    }
    
    protected MyCanvas controller = null;
    }

    Or is this normal because i run this on my computer…


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General
    #mobile


  • 4.  RE: Using the camera

    Posted 03/11/14 11:47 AM

    I can’t see anything wrong with your code. pls try to run it on a phone. I’m not sure if your simulator on computer will take control of its camera, most likely not.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods
    #mobile


  • 5.  RE: Using the camera

    Posted 08/15/14 07:38 AM

    Hello, Tong. I am also new here to do intership in Software AG. Are u still in here? I am chinese also. Now i do some Mobiel Development works, but I have some problems with the database and server connection. Can we exchange the contact way? Thank u a lot


    #webMethods
    #mobile
    #webMethods-General
    #Integration-Server-and-ESB


  • 6.  RE: Using the camera

    Posted 08/15/14 04:37 PM

    Pigeon,
    If you have questions/issues, post it to the forum.
    I’m sure someone will help you.
    Tong


    #mobile
    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 7.  RE: Using the camera

    Posted 08/15/14 05:04 PM

    Hey, hello,
    I met a question. I know codes using cookbook. I used the HttpConnection.openHttpConnectionByteArrayData(String url, int encoding_format, byte data_to_send, String request_properties) this method to try a connect to server using Intergration Server. (localhost : 5555). So my questions are:

    1. I wanna know about the JDBC, Server, Client and Database the connection structure, because my cookbook author has already configured the structure, I do not need to do that any more, but I write the same codes like the cook book, and I run the cookbook original source programm, it runs, but my did not work, and It has also not problem about the logic.
      I want to know, how I can know, wether I already connect to the Server?
      Best Regards
      Pigeon


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods
    #mobile


  • 8.  RE: Using the camera

    Posted 08/15/14 05:41 PM

    If you are connecting to a Integration Server, check the sessions on IS side, so you will know if your connection is working.

    Also, try to do something with your opened connect, so you will know if it works.
    HTH,


    #mobile
    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: Using the camera

    Posted 08/26/14 08:43 AM

    Hey, Wang Tong. How are you, thank you for ur replay. I have tried ur eay and i have solve the Problem I met befor about the server conncetion. I met some questions more unfortunetly, I have wrote it in the forum with some pictures, maybe it will be better to be understood. And I personally has a questoin, that is has Mobile Designer some WYSIWYG tool to design the UI for Applications, like “Droid-Draw” or “Xamarin” ?

    Thank you Tong Wang and Thanks for everyone who maybe some tipps!
    HU, Tiange


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB
    #mobile