Qt/QML App for Friendiqa
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IntentReceiver.qml 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import QtQuick 2.0
  2. import AndroidNative 1.0
  3. Item {
  4. id:intent
  5. /// The URL of the image chosen. If multiple images are picked, it will be equal to the first image.
  6. property string imageUrl: ""
  7. /// A list of images chosen
  8. property var imageUrls: []
  9. property string m_TEXT_MESSAGE: "androidnative.TextIntent.chosen";
  10. property string m_IMAGE_MESSAGE: "androidnative.ImagePicker.chosen";
  11. Connections {
  12. target: SystemDispatcher
  13. onDispatched: {
  14. if ((type === m_IMAGE_MESSAGE)&& (root.imagePicking==false)) {
  15. var h=[];
  16. for (var n in message.imageUrls){
  17. h.push("file://"+ decodeURIComponent(message.imageUrls[n]).substring(5))
  18. }
  19. imageUrls=h;
  20. if(imageUrls.length==1){
  21. root.currentIndex=0;newstab.active=true;
  22. root.uploadSignal(imageUrls)
  23. } else{
  24. root.currentIndex=2;fotostab.active=true;
  25. root.uploadSignal(imageUrls)
  26. }
  27. } else if (type==m_TEXT_MESSAGE){
  28. root.currentIndex=0;newstab.active=true;
  29. root.sendtextSignal(message)
  30. }
  31. }
  32. }
  33. Component.onCompleted: {
  34. SystemDispatcher.setInitialized();
  35. print("timer " + login.timerInterval)
  36. if (login.timerInterval !=0){
  37. alarm.setAlarm(login.timerInterval);
  38. }
  39. }
  40. }