0

My Code as below, when i get the intent log only return me ok. I need to get list of profile in data wedge. Please help.

(<any>window).plugins.intentShim.sendBroadcast({  
    action: 'com.symbol.datawedge.api.ACTION',  
    extras: {  
      "com.symbol.datawedge.api.GET_PROFILES_LIST": ""  
    }  
  },  
  function (intent) {
    let data_string = "com.symbol.datawedge.api.RESULT_GET_PROFILES_LIST"; 
    console.log('Profile-' + intent.extras[data_string]);
   },  
  function () {
   }  
);  
Delphi Coder
  • 1,723
  • 1
  • 14
  • 25
micky
  • 235
  • 2
  • 4
  • 16

1 Answers1

1

If you want to get a list of all profiles then you should use GET_PROFILES_LIST, documented at http://techdocs.zebra.com/datawedge/7-0/guide/api/getprofileslist/. There is a sample app that shows how to call this at https://github.com/Zebra/samples-datawedge/blob/master/DataWedge-API-Exerciser/app/src/main/java/com/zebra/datawedgeexerciser/MainActivity.java#L241

Darryn Campbell
  • 1,441
  • 10
  • 13
  • I have modified my code and now the intent only return me "OK" without any others value. Not able to get list of profile in IONIC. I have edited my answer have u found any mistake? – micky Dec 03 '18 at 08:35
  • Does the Ionic demo app scan and display barcodes on your device? (https://github.com/Zebra/ZebraIonicDemo). Also, which devices are you using? – Darryn Campbell Dec 03 '18 at 14:53
  • I have installed this demo. It able to listing all my profile, scan, and others function also working fine. I am using TC56. – micky Dec 04 '18 at 02:10
  • Great, if it is listing all your profiles then the issue is resolved? – Darryn Campbell Dec 04 '18 at 15:16
  • The demo using java is working fine. But i am using ionic in my sample code is not working. The intent only return OK. Still not able to get any profile on the intent. – micky Dec 06 '18 at 03:29
  • Please see this checkin which shows how to call GET_PROFILES_LIST. It works on my TC57 so should work for you also: https://github.com/Zebra/ZebraIonicDemo/commit/265c092c099d1f6fae09ebe9cb91dab348a85086 – Darryn Campbell Dec 07 '18 at 09:00