Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Image capture stopped working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Image capture stopped working

    All,

    I can't seem to get my app to activate my camera any longer. It worked early last week but now it just goes to "Choose a file to upload". I assumed I did something to my control so I restored a copy from last week, two weeks ago, and then 3 weeks ago and none of them would work anymore.

    Next I downloaded Selwin's example "FormView_imageCapture" but it does that same thing. I've also try reinstalling AlphaAnywhere in case something got screwed up with my install but still no luck.

    I've been testing this on a Microsoft Surface, and on my Galaxy S7.

    The attached control is just a quick basic test that does not work on my end.

    I'm running
    Version: 12.4.4.3, Build 4254
    System Addins: Build 4863

    TESTING.a5wcmp

    Hopefully one of you Alpha Guru's can get me back in the image capturing business.

    Jim

    #2
    Re: Image capture stopped working

    PhoneGap Build? If so, what version? In the sample you attached, the Javascript to execute after capture isn't valid. Your setting the element id 'image' directly, but 'image' as an id doesn't exist.

    It would have to be either...

    Code:
    var imgEle = {dialog.Object}.getPointer('image1');
    imgEle.src = e.data;
    or

    Code:
    $('{dialog.ComponentName}.V.R1.IMAGE1').src = e.data;
    But... you're saying your camera doesn't activate? Any changes/updates to your Galaxy S7?

    Running you test on my Nexus 7 (2013) with Android 6.01, the camera fires up.

    Comment


      #3
      Re: Image capture stopped working

      After a little more testing it seems to only be a problem when run through phonegap. My PG settings are below. I feel like I've got it right but my results suggest otherwise.

      phonegapsettings.jpg

      Comment


        #4
        Re: Image capture stopped working

        But is your problem still no camera access?

        There are some required plugins when working with certain aspects of an app. Device and File should be included when working with Camera.

        Comment


          #5
          Re: Image capture stopped working

          Yes, still no camera access when using PhoneGap. I modified my PG settings by adding Device and File but I'm getting the same results, no camera just direct to the gallery.

          Comment


            #6
            Re: Image capture stopped working

            I'd guess it's your S7... maybe a setting. Here's a QRCode... this works on my Nexus 7. The camera will work without the Device and File, but saving won't.

            Android_Camera_App.PNG

            Comment


              #7
              Re: Image capture stopped working

              Your app worked on my S7. Can you send me a snapshot of your PG settings?

              Comment


                #8
                Re: Image capture stopped working

                Here's my test config.xml file. The only other plugin I have set is whitelist... dialogs is automatically used.

                config.zip

                Comment


                  #9
                  Re: Image capture stopped working

                  Check the logs on your phone gap build look to see if the plugin is working. Android was having issues with the version of Cordova alpha is running if you download the most recent pre release it may fix your issue I ran in to this as well last week.

                  Comment


                    #10
                    Re: Image capture stopped working

                    Correction, there is an issue with plug ins not working in android, however I believe the case here is the method you are using. I originally had html5 as the method for capturing, when you switch it to phone gap you are supposed to use the e.filesystem method. This is still an issue for me, I do not want to use the e.filesytem method. The javascript and ajax callback I am using now was working up until I tried to implement phone gap. An annoyance is an understatement here. If anyone has an example of what to do in a unbound ux, using image capture with phone gap preferred settings please advise here thanks.

                    This is the JavaScript I have been using

                    function updateimagenow() {
                    //Get the data from the picture or selected image.
                    $('{dialog.ComponentName}.V.R1.RECEIPTIMAGE').src = e.data;
                    //{dialog.object}.setValue('RECEIPTIMAGE',e.fileSystemURL)
                    //since image control can't make UX dirty, it is updated immediately after the picture is taken.
                    //Update only if user is editing an existing record and the primary records.
                    //New records are updated from the Save button java script.
                    var nExpenseID = {dialog.object}.getValue('ExpenseID');
                    if(nExpenseID > 0)
                    {
                    var imageCtrl = {dialog.Object}.getPointer('RECEIPTIMAGE');
                    var photoData = imageCtrl.src;
                    var photoDataEnc = encodeURIComponent(imageCtrl.src);
                    {dialog.object}.ajaxCallback('','','xbUpdateImage','','__photoData=' + photoDataEnc);
                    }
                    }
                    updateimagenow();

                    Here is the Ajax call back
                    function xbUpdateImage as c (e as p)
                    on error goto error_handler3

                    Dim sqlInsert as c
                    Dim cn as sql::connection
                    dim args as sql::arguments
                    dim shared msg as c
                    dim ok as l
                    dim sqlCommand as c
                    dim args as sql::arguments
                    dim rs as sql::ResultSet
                    dim flag as l
                    dim js as c
                    js=""

                    'debug(1)
                    ok = cn.open("::Name::udb")
                    if ok then
                    dim photoData as c = e.__photoData
                    photoData = substr(photoData,24)
                    dim photoDataBin as b = base64decode(photoData)
                    sqlCommand = "Update Job.Expense Set ReceiptImage=:whatReceiptImage WHERE ExpenseID = :whatExpenseID"
                    args.add("whatReceiptImage",photoDataBin)
                    args.add("whatExpenseID",e.dataSubmitted.ExpenseID)
                    ok = cn.execute(sqlCommand,args )
                    'if ok then
                    ' xbUpdateImage = js_escape("alert('ok');")
                    'else
                    ' xbUpdateImage = js_escape("alert('no good');")
                    'end if
                    end if




                    return

                    error_handler3:

                    err = error_code_get()
                    errstr = ltrim(str(err))
                    msg = error_text_get(err)
                    xbUpdateImage = js_escape("alert('" + msg + "');")
                    end function

                    Comment


                      #11
                      Re: Image capture stopped working

                      You do NOT need an Alpha pre-release to fix the Cordova / PhoneGap / PhoneGap Build mess. You DO need to provide a version for each plugin and those versions are specified in at least one post in this forum...

                      https://forum.alphasoftware.com/show...ersion-Numbers

                      The general process is to save your settings under the Alpha PhoneGap Build builder.
                      Check your config.xml file to ensure the correct version numbers are used for each plugin.
                      Check to ensure duplicate plugins have not creeped into config.xml.
                      Submit to PhoneGap Build.

                      Colin... could you provide a sample UX? There are 100 settings that could affect what you want to do.

                      Comment


                        #12
                        Re: Image capture stopped working

                        David,

                        Thanks for the response here is a zip file with the component in it.
                        Attached Files

                        Comment


                          #13
                          Re: Image capture stopped working

                          Thanks for the help with the plugins that makes sense. I had updated my alpha and it changed my version they sent out a quick pre release to put the version back for android. Changing the config file would have done that to you are correct, that just happened to me over night and I did not even think to change those. So thanks again now I know.:)

                          Comment

                          Working...
                          X