[SailfishDevel] How do you evaluate the recent events of jolla

2015-07-08 Thread itviewer

http://www.jollausers.com/2015/07/press-jolla-strengthens-focus-on-sailfish-os-licensing-and-development-a-new-company-to-continue-device-business/
 


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] How to change Virtual box's screen orientation

2015-04-14 Thread itviewer
Hi,
I have tried build nemo for VirtualBox,and now it can start into glacier ui.
In the kickstart file(.ks),the bootloader option is :
bootloader --timeout=20 --append=vga=0x343 vt.global_cursor_default=0 
--location=mbr
so,the screen mode is 800*600*32.

I tried to set vga=ask,then boot it,but all options for select do not 
include 600*800(width*height mode?)
I don't familiar with Virtual box and Linux kernel,the question is how to 
change the screen orientation,rotate 90 degrees to 600*800?

Thanks every friend.



ma xinjun
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] How to change Virtual box's screen orientation

2015-04-14 Thread itviewer
Hi,
Thanks you all,I  understand now



ma xinjun
 
From: Reto Zingg
Date: 2015-04-14 20:37
To: devel
Subject: Re: [SailfishDevel] How to change Virtual box's screen orientation
Hi,
 
On 14.04.2015 14:48, Chris Walker wrote:
 On Tue, 14 Apr 2015 19:08:42 +0800
 itviewer itvie...@jolladev.net wrote:

 Hi,
  I have tried build nemo for VirtualBox,and now it can start into
 glacier ui. In the kickstart file(.ks),the bootloader option is :
  bootloader --timeout=20 --append=vga=0x343
 vt.global_cursor_default=0 --location=mbr so,the screen mode is
 800*600*32.

  I tried to set vga=ask,then boot it,but all options for select
 do not include 600*800(width*height mode?) I don't familiar with
 Virtual box and Linux kernel,the question is how to change the
 screen orientation,rotate 90 degrees to 600*800? Thanks every friend.

 Under ~/userid/SailfishOS/emulator/SailfishOS Emulator/ there is an
 XML file SailfishOS Emulator.vbox.

 The resolution for the Emulator is shown there as :-
 ExtraDataItem name=CustomVideoMode1 value=540x960x32/

 
You can find information on how to change that here:
 
http://www.virtualbox.org/manual/ch09.html#idp99599360
 
so eg
 
if you add to your VM:
VBoxManage setextradata VM-NAME CustomVideoMode2 600x800x32
 
you have to set
 
vga=865
 
in the kernel command line.
 
br
Reto
 
 But there is a comment at the top of the file which says :-
 ** DO NOT EDIT THIS FILE.
 ** If you make changes to this file while any VirtualBox related
 application ** is running, your changes will be overwritten later,
 without taking effect. ** Use VBoxManage or the VirtualBox Manager GUI
 to make changes.

 So have you tried VBoxManage to check/change the resolution?
 ___
 SailfishOS.org Devel mailing list
 To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

 
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] Compared with Ubuntu touch,are there any advantages to jolla?

2014-09-24 Thread itviewer
Compared with Ubuntu touch,are there any advantages to jolla? ___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] A friendly warning to jolla

2014-08-24 Thread itviewer

As a developer who have been waiting for your  for more than one years,  I'm 
losing interest for jolla.
Just a friendly warning to you:If you do not enter the Chinese market in 
September , you will lose the Chinese market this year.

In fact ,I really wanted to say that your attitude toward the Chinese market is 
really a pile of shit .

Forgive my rudeness, I just want to express a developer's anger. Yes, Just a 
developer's anger !   




ma xinjun___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] A friendly warning to jolla

2014-08-24 Thread itviewer
Sorry, I mean the Chinese mainland market.
Maybe you do not really understand the market relations between Hong Kong and 
mainland China.

Only for the purposes of market relations,The relationship between Hong Kong 
and the mainland market is similar between countries.
for example,There are tariffs and other conditions.

The vast majority of people from the mainland to Hong Kong needs  special 
permit, similar visas.

I hope you already know what I mean.




ma xinjun

From: Kaj-Michael Lang
Date: 2014-08-24 21:11
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] A friendly warning to jolla
On Sun, 24 Aug 2014, itviewer wrote:


 As a developer who have been waiting for your  for more than one years,  I'm 
 losing interest for jolla.
 Just a friendly warning to you£ºIf you do not enter the Chinese market in 
 September , you will lose the Chinese market this year.

 In fact ,I really wanted to say that your attitude toward the Chinese market 
 is really a pile of shit .

Did you miss the whole Jolla released in Hong Kong thingy ? Perhaps I 
don't see the issues here, HK being part of China afaik ?

http://www.three.com.hk/website/appmanager/three/home?_nfpb=truepageid=f41011_pageLabel=P600193131219996753703lang=eng

-- 
Kaj-Michael Lang


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] [Update] Changelog for SailfishOS update 4 (1.0.4.20)

2014-03-17 Thread itviewer
After updated,the Android application (or aliendalvik )can't work ,
Do you have the problem ?




ma xinjun

From: Bernd Wachter
Date: 2014-03-18 02:52
To: sailfish-devel
Subject: [SailfishDevel] [Update] Changelog for SailfishOS update 4 (1.0.4.20)

Hi all,

we're finally releasing update4 today. The changelog can be found (and
commented on) here:

https://together.jolla.com/question/33507/release-notes-software-version-10420-ohijarvi/

Changelog and instructions are appended below, for discussions please go
to together.


What's new
--

* Landscape mode in Email, Messages and Notes apps
* Two-way sync for google calendar
* Self timer, tap-to-focus, view finder grid, exposure and ISO settings
   in Camera
* Renewed Jolla Store experience
* Export/import backup data using memory card
* New options under Settings
  - Share internet connection via WLAN tethering
  - Transfer contacts via Bluetooth (using SyncML protocol via
 Settings-Apps-People-From device with Bluetooth). Currently
 supported devices: N9, N900, N950, Symbian devices
  - Gesture orientation lock [Settings-System-Display]
  - Call barring option [Settings-Apps-Phone]
  - Setting to enable installation of untrusted software
  - The Other Half ID visible [Settings-System-About Product]
  - Option to select enabled keyboard layouts
* Ability to backup/restore notes
* New Exchange ActiveSync policies introduced (lock time, minimum lock
   password length)


Fetch the update


Pre-requisites 

You need a working Jolla account  configured on your device in order to
receive update notifications. If  you are unable to successfully
configure the account, please visit account.jolla.com and try to reset
your password.

It is recommended to have the charger connected before attempting to
upgrade the device.


Update the software 

If your Jolla is connected to WLAN network, an OS update notification
should pop up shortly. If you just can't wait, you can manually trigger
an OS update check as follows:

1. Open Settings appGo to System Settings - About Product 
2. Pull down the pulley menu and select 'Check for update'
3. Once an OS update notification is received, tap on it and follow the
   instructions.


Do __not__ reboot the device while the OS update installation is in
progress. The process takes up to 10 minutes. During the update, the
device screen might blank out. You may awaken the display by a short
press on the power key to monitor the progress. When the upgrade has
completed successfully, you will see the LED light up *red* before the
device restarts.

In rare circumstances, you may have to try a second time to get through
the update successfully.


Highlights of improvements
--

* Fixes several issues causing spontaneous reboots on the phone
* Fixes issue on WLAN connection freezing the UI
* Resolved several cases causing homescreen restart with green/red LED
  blinking
* Improves memory card handling
  - Mounts multiple partitions from memory card
  - MTP now shows the memory card, and works with iPhoto on Mac
* Even slicker UI and higher performance, thanks to optimisations in the
  graphics stack
* Improves memory usage via app wallpaper optimisations
* Fine-tuned touch parameters to avoid accidental taps and gestures


UI improvements
---

* More prominent pulley menu indicator
* Adds background gradient to Sailfish panels to clearly differentiate
  them from application area
* Decreases the intensity of the cover action dimmer gradient
* Improved glass effect on Sailfish Silica components such as switches,
  sliders, progress bars and page indicators


Settings


* Bluetooth sync requests can now be cancelled
* Improved user experience and error handing during Jolla account
  creation
* Enabling developer mode when there is no Jolla account configured now
  gives an error message
* Enabling developer mode now asks for device lock code if it has been
  set


Security
---

* CVE-2013-2116, CVE-2014-0092, CVE-2013-1619 fixed for GnuTLS
* CVE-2013-4353, CVE-2013-6450, CVE-2013-6449, CVE-2013-0169,
  CVE-2013-0166, CVE-2012-2686 fixed for OpenSSL



Homescreen
--

* Unlocking the device now presents the last viewed app if unlocked
  within 10 seconds of locking the device
* When the device lock is enabled for the first time, it also sets the
  automatic locking period of 10 minutes by default
* Indication in the app grid for the apps currently being installed
* Updates status indicators when they are partially visible too
* Uses glass background in Switcher
* Adds press effect to launcher items
* Indicates top blank screen gesture on home more clearly
* Bounces the view up when user taps on the lock screen
* Introduces glass texture background to app covers
* App close-icon scales and works with orientation changes
* Reduces cover action triggering distance for easier access


Store client


* Renewed landing page for store 

[SailfishDevel] 回复: How to debug Julla

2014-02-27 Thread itviewer
Hi chendong,
From your name (chendong),I think you're from China.
If I guess right , I regret to tell you that ,for China's current network 
environment, the jolla is unavailable
I don't know the reason,But if you use a proxy of other countries,the phone's 
network will work well 
and the system can be upgrade normally .




ma xinjun

发件人: Tony
发送时间: 2014-02-27 14:41
收件人: devel
主题: [SailfishDevel] How to debug Julla
Hi,


My Julla ’s system version is 1.0.0.5. I tried to upgrade the system , but 
system mentioned that is the newest version. 
Besides , I also tried to start using development mode. The system noticed that 
development package install failed.


Do you know how to debug it ? 


tony.chend...@gmail.com___
SailfishOS.org Devel mailing list

[SailfishDevel] how can I translate the application name

2014-02-18 Thread itviewer
Hi all,
If I want my application to be Internationalization ,how can I  translate the 
application name?
I know the “Name”defined in the .desktop-Files is shown in the application 
launcher as the application name,
But how can I translate it for Internationalization ?

thanks .



ma xinjun___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] how can I translate the application name

2014-02-18 Thread itviewer
Sorry,I cant't understand.
How does the jolla official application  display different names depending on 
the language?

From: maledictusdemagog
Date: 2014-02-19 13:20
To: devel
Subject: Re: [SailfishDevel] how can I translate the application name
You should not translate application name


Wed Feb 19 2014 07:38:48 GMT+0300 (FET) получено от itviewer:
Hi all,
If I want my application to be Internationalization ,how can I  translate the 
application name?
I know the “Name”defined in the .desktop-Files is shown in the application 
launcher as the application name,
But how can I translate it for Internationalization ?

thanks .



ma xinju

-- 
Отправлено с устройства Jolla
___
SailfishOS.org Devel mailing list___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Please help me, how to get the screen capture without block UI

2014-02-14 Thread itviewer
thanks,But I want capture all the desktop screen




ma xinun

发件人: Raine Mäkeläinen
发送时间: 2014-02-14 17:25
收件人: Sailfish OS Developers
主题: Re: [SailfishDevel]Please help me, how to get the screen capture without 
block UI
Hi,

If you want to capture something on your application side, you can grab whole 
window through QQuickItem. This part is blocking but you can do capture 
manipulations in async manner quite simple by using QFutureWatcher.

Like:

void ScreenShow::screenShot(QQuickItem *item)
{
if (item  item-window()) {
// Blocks for a short moment
QImage image = item-window()-grabWindow();
// Could be done in later
image.save(/home/nemo/Pictures/iface.png)
}
}

-Raine





Lähettäjä: devel-boun...@lists.sailfishos.org 
[devel-boun...@lists.sailfishos.org] käyttäjän itviewer [itvie...@jolladev.net] 
puolesta
Lähetetty: 14. helmikuuta 2014 9:19
Vastaanottaja: devel
Aihe: [SailfishDevel] Please help me, how to get the screen capture without 
block UI


Dear ,
attachment is all my code,and I have been tried many times
but it still block the UI(about 3 seconds)  when the program starts ( or after 
click  the label“Hello Sailors”)
While, it seems that there is no such blocking when using the harbor store app 
screenshot.

Very grateful,thanks everybody。



ma xinjun___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Please help me, how to get the screen capture without block UI

2014-02-14 Thread itviewer
Hi  Storbjörk ,
Thank you very much,you are right!
By the way,in the latest “screenshot”,if choose “Use PNG”option,it will also 
block the UI!
Therefore, we should use  .jpg instead of .png!
thanks again.




ma xinjun

发件人: Andreas Storbjörk
发送时间: 2014-02-14 23:51
收件人: Sailfish OS Developers
主题: Re: [SailfishDevel]Please help me, how to get the screen capture without 
block UI
Hi,

You could try to save as .jpg instead and see if that speeds it up.

On 14.2.2014 09:19, itviewer wrote:

Dear ,
attachment is all my code,and I have been tried many times
but it still block the UI(about 3 seconds)  when the program starts ( or after 
click  the label“Hello Sailors”)
While, it seems that there is no such blocking when using the harbor store app 
screenshot.

Very grateful,thanks everybody。



ma xinjun

 

___
SailfishOS.org Devel mailing list___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] How to get the screen capture but don't block UI

2014-02-12 Thread itviewer
My code just like:

QDBusMessage message = 
QDBusMessage::createMethodCall(org.nemomobile.lipstick,
/org/nemomobile/lipstick/screenshot,
 org.nemomobile.lipstick,
saveScreenshot );
QDBusConnection conn =  QDBusConnection::sessionBus();
conn.send(message);

   But it still block the UI ( screen will not response within a few seconds)
   Please help!Thanks very much.




ma xinjun

From: David Greaves
Date: 2014-02-12 17:23
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] How to get the screen capture but don't block UI
Correct

David

On 12/02/14 06:46, Andrey Kozhevnikov wrote:
 using Qt DBus classes and not use system() call?
 
 On 12.02.2014 12:08, itviewer wrote:
 Dear all,
  
 I need the screen capture function in my application . There are two
 applications (screenshot and  opensource sailshotme) in the jolla store.
  
 From the sailshotme, I know that  can call the saveScreenshot method of
 org.nemomobile.lipstick through dbus, such as the command:
  
 dbus-send --session --type=method_call --print-reply
 --dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot
 org.nemomobile.lipstick.saveScreenshot  string:/home/nemo/Pictures/123.png 
  
 but, using the sailshotme or the above mentioned command will lead to the 
 UI
 blocking of sailfish system, the screen will not response within
 a few seconds, however, it seems that there is no such blocking when using 
 the
 screenshot.
 so I want to know the mechanism of the screenshot?
  
 BestRegards
  
 
 ma xinjun


 ___
 SailfishOS.org Devel mailing list
 
 
 
 ___
 SailfishOS.org Devel mailing list
 

___
SailfishOS.org Devel mailing list___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] How to get the screen capture but don't block UI

2014-02-12 Thread itviewer
thanks,I tried the code but it still block the UI .
Do you test it and what is the result ? 




ma xinjun

From: Andrey Kozhevnikov
Date: 2014-02-12 22:33
To: devel
Subject: Re: [SailfishDevel] How to get the screen capture but don't block UI
QDBusInterface *iface = new QDBusInterface(org.nemomobile.lipstick,
   /org/nemomobile/lipstick/screenshot,
  org.nemomobile.lipstick,
   QDBusConnection::sessionBus(),
   this);
iface-call(QDBus::NoBlock, saveScreenshot, /home/nemo/Pictures/123.png);


On 12.02.2014 20:26, itviewer wrote:

My code just like:

QDBusMessage message = 
QDBusMessage::createMethodCall(org.nemomobile.lipstick,
/org/nemomobile/lipstick/screenshot,
 org.nemomobile.lipstick,
saveScreenshot );
QDBusConnection conn =  QDBusConnection::sessionBus();
conn.send(message);

   But it still block the UI ( screen will not response within a few seconds)
   Please help!Thanks very much.




ma xinjun

From: David Greaves
Date: 2014-02-12 17:23
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] How to get the screen capture but don't block UI
Correct

David

On 12/02/14 06:46, Andrey Kozhevnikov wrote:
 using Qt DBus classes and not use system() call?
 
 On 12.02.2014 12:08, itviewer wrote:
 Dear all,
  
 I need the screen capture function in my application . There are two
 applications (screenshot and  opensource sailshotme) in the jolla store.
  
 From the sailshotme, I know that  can call the saveScreenshot method of
 org.nemomobile.lipstick through dbus, such as the command:
  
 dbus-send --session --type=method_call --print-reply
 --dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot
 org.nemomobile.lipstick.saveScreenshot  string:/home/nemo/Pictures/123.png 
  
 but, using the sailshotme or the above mentioned command will lead to the 
 UI
 blocking of sailfish system, the screen will not response within
 a few seconds, however, it seems that there is no such blocking when using 
 the
 screenshot.
 so I want to know the mechanism of the screenshot?
  
 BestRegards
  
 
 ma xinjun


 ___
 SailfishOS.org Devel mailing list
 
 
 
 ___
 SailfishOS.org Devel mailing list
 

___
SailfishOS.org Devel mailing list

 

___
SailfishOS.org Devel mailing list___
SailfishOS.org Devel mailing list

[SailfishDevel] How to get the screen capture but don't block UI

2014-02-11 Thread itviewer
Dear all,

I need the screen capture function in my application . There are two 
applications (screenshot and  opensource sailshotme) in the jolla store. 

From the sailshotme, I know that  can call the saveScreenshot method of 
org.nemomobile.lipstick through dbus, such as the command:

dbus-send --session --type=method_call --print-reply 
--dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot 
org.nemomobile.lipstick.saveScreenshot  string:/home/nemo/Pictures/123.png 

but, using the sailshotme or the above mentioned command will lead to the UI 
blocking of sailfish system, the screen will not response within 
a few seconds, however, it seems that there is no such blocking when using the 
screenshot.
so I want to know the mechanism of the screenshot?

BestRegards 



ma xinjun___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] When does Jolla give us an API?

2014-02-03 Thread itviewer

+11

From: Luciano Montanaro
Date: 2014-02-04 01:10
To: Sailfish OS Developers
CC: David Greaves
Subject: Re: [SailfishDevel] When does Jolla give us an API?
Hi everybody,

I too find documentation a bit missing...
But it is not much about APIs, but system level documentation.
Qt documentation is good, at least for the parts that are still
actively maintained.

But SailfishOS uses Qt, on top of wayland, systemd, pulse,gstreamer
and telepathy, and a bunch of other services.

Open source package documentation can be very good, or completely missing.

Moreover, to achjeve the same thing I may use a Qt based API, or, say,
DBUS messages.

So I think that more than the APIs, it is the list of allowed or
preferred services that is needed.

SailfishOS as a Linux distribution is quite modern, and it would help
to know more about its plumbing.

Just my 2 cents.

Best regards,

Luciano

On Mon, Feb 3, 2014 at 5:59 PM,  christopher.l...@thurweb.ch wrote:
 Hi all

 my experience is that are a vast amount of apis out there: There is all the
 Qt stuff, the Qt add-ons, Nemo packages, and lower-level stuff like
 telepathy and GST. The problem is not the lack of APIs, but the choice of
 APIs. Which is the best one to use?.

 Then if you hit on a likely API, and find some good examples on the
 interweb, then it is not sure that that API will fully work on the Jolla
 (although this is likely to improve with every update as the Jolla matures).

 And if the chosen API works from a technical point of view, then that does
 not mean that harbour will permit it ... although this too should improve
 with time.

 On the whole I have found the Qt documentation to be very good. Where things
 get a bit shaky is using esoteric things like gaining device resource
 permissions (e.g permission to use the LED, or to access the phones
 contacts). For this sort of thing I often have to resort to the source code
 (which at work we call the ultimate documentation .8-) )

 mfg

 Chris

 Zitat von David Greaves david.grea...@jolla.com:


 On 03/02/14 15:29, Putze Sven wrote:

 Hi there,

 during Fosdem I spoke to some people about this, even to Carsten Munk
 from
 Jolla itself (not in the depth and detail of this mail, I must admit) and
 he
 suggested to write this in the mailing list, so those of Jolla who should
 be
 concerned have a chance to answer this question and I really would like
 to
 hear some official statements here.


 Did you manage to get to the round-table event? - we spent a fair bit of
 time
 talking about APIs there; we also openly discussed the issues we face.

 I know that the community people there wanted to continue the discussion.

 What does a developer need to write quality apps? An API and a
 documentation
 of such.

 So far there is a quite limited API available and therefore we don't see
 too
 many apps out there. How will you write a sophisticated app, if the API
 is
 not available or it is not allowed to use or is only known to those with
 Maemo/Meego history?


 A quick response: we support the Qt API and rather than developing our own
 proprietary one we're working hard to support the open one as it grows.

 The Qt documentation is extensive and superb :)
 Using it in Sailfish Silica apps is less well documented but is improving
 (and
 honestly is mainly a tutorial issue for new developers - not an API docs
 issue).

 Yes there are some APIs in the mobile space that are not part of the Qt
 release
 yet - Qt 5.2 will introduce more.

 David

 ___
 SailfishOS.org Devel mailing list




 ___
 SailfishOS.org Devel mailing list



-- 
Luciano Montanaro

Anyone who is capable of getting themselves made President should on
no account be allowed to do the job. -- Douglas Adams
___
SailfishOS.org Devel mailing list___
SailfishOS.org Devel mailing list

[SailfishDevel] How can I use qtwebsockets module?

2014-01-22 Thread itviewer
Hi ,
As “qtwebsockets” become more 
mature(https://qt.gitorious.org/qt/qtwebsockets/source/master: )
 There are some features in my app that I intend to use this module,So I want 
to learn about whether it is now possible to use?

sorry for my english
thanks___
SailfishOS.org Devel mailing list

[SailfishDevel] header intact

2013-12-25 Thread itviewer
___
SailfishOS.org Devel mailing list

[SailfishDevel] How to get contacts and sms through Qt(C++)

2013-12-22 Thread itviewer
Hi Chris
Thank you very much  for your guidance,It's very helpful for me and I will try 
as your use-case.

My mother tongue is Chinese and my English is so-so. 
Wishing you and your family a very merry Christmas. 




maxinjun 

From: christopher.lamb
Date: 2013-12-22 18:55
To: itviewer; devel@lists.sailfishos.org
Subject: Fwd: Re: Re: [SailfishDevel] How to get contacts and sms through 
Qt(C++)
Hi Max

No problem, your english is excellent. What is your mother language?

I am visiting family for Christmas at the moment, so I will keep this  
first mail short. I will try and post again this evening.

So first, SMS: In my app I only need to send smses, and I do it using  
the Telepathy library. My explanation below reflects how I did it  
and my use-case, but there are other routes you can take.

The C++ code I am using is at the bottom of this mail.

Note this is ported from Harmattan, and not fully tested yet as my  
Sailfish app is not fully ported, and I only have the Emulator. No  
sign of my phone arriving ...

On Harmattan I originally used the Mobility API, but as that API had a  
very negative effect on app startup time, and is not available for Qt5  
/ Sailfish, I wrote code similar to that below for Harmattan, and was  
able to test it with a real Nokia N9.

//in the .pro file

QT += dbus

PKGCONFIG += TelepathyQt5

Note I need to play around more with the .pro file settings, but with  
the ones above, Telepathy is found, and the code compiles.

Note also that the account used below is almost certainly wrong for  
Sailfish, it is the one that works on the N9.

You also need to make sure that the correct Telepathy Modules are  
installed. I will post more on this later, but for now I think you  
will need
telepathy-ring-devel, telepathy-mission-control, telepathy-qt5-devel.

I will post separately on QtContacts in the next few days, as and when  
Christmas / family festivities permit.

Ciao

Chris



//start telepathy.h
#ifndef TELEPATHYHELPER_H
#define TELEPATHYHELPER_H

#include TelepathyQt/Types

#include QObject
#include QString

namespace Tp
{
 class PendingOperation;
}

class TelepathyHelper : public QObject
{
 Q_OBJECT

public:
 explicit TelepathyHelper(QObject *parent = 0);
 ~TelepathyHelper();
 Q_INVOKABLE void sendSMS(const QString contactIdentifier, const  
QString message);

signals:
 void stateMsg(const QString statemsg);
 void errorMsg(const QString errormsg);

private Q_SLOTS:
 void onSendMessageFinished(Tp::PendingOperation *op);

private:

 Tp::ContactMessengerPtr messenger;

};

#endif // TELEPATHYHELPER_H
//end //start telepathy.h

//start telepathy.cpp
#include telepathyhelper.h

#include TelepathyQt/Account
#include TelepathyQt/Debug
#include TelepathyQt/Constants
#include TelepathyQt/ContactMessenger
#include TelepathyQt/PendingSendMessage
#include TelepathyQt/Types


TelepathyHelper::TelepathyHelper(QObject *parent) :
 QObject(parent)
{

 Tp::registerTypes();
 Tp::enableDebug(true);
 Tp::enableWarnings(true);
}

TelepathyHelper::~TelepathyHelper()
{
}

void TelepathyHelper::sendSMS(const QString contactIdentifier, const  
QString message)
{

 Tp::AccountPtr acc = Tp::Account::create(TP_QT_ACCOUNT_MANAGER_BUS_NAME,
   
QLatin1String(/org/freedesktop/Telepathy/Account/ring/tel/ring));
 //QLatin1String(/org/freedesktop/Telepathy/Account/ring/tel/account0));
 messenger = Tp::ContactMessenger::create(acc, contactIdentifier);

 connect(messenger-sendMessage(message),
 SIGNAL(finished(Tp::PendingOperation*)),
 SLOT(onSendMessageFinished(Tp::PendingOperation*)));

}

void TelepathyHelper::onSendMessageFinished(Tp::PendingOperation *op)
{
 if (op-isError()) {
 qDebug()  Error sending message:  op-errorName()   
-  op-errorMessage();
 emit errorMsg(Error sending message);
 return;
 }

 Tp::PendingSendMessage *psm = qobject_castTp::PendingSendMessage *(op);
 qDebug()  Message sent, token is  psm-sentMessageToken();
 emit stateMsg(FinishedState);
}

//end telepathy.cpp

- Weitergeleitete Nachricht von itvie...@jolladev.net -
  Datum: Sun, 22 Dec 2013 17:36:18 +0800
Von: itviewer itvie...@jolladev.net
Betreff: Re: Re: [SailfishDevel] How to get contacts and sms  
through Qt(C++)
 An: christopher.lamb christopher.l...@thurweb.ch

Hi Chris
Thanks for your help,I  reviewed all your posts ,however, I still do  
not know how to start.
Will you be able to provide some cases I can refer to?

Thank you and sorry for my english.


maxinjun

From: christopher.lamb
Date: 2013-12-22 15:59
To: Sailfish OS Developers; itviewer
CC: devel
Subject: Re: [SailfishDevel] How to get contacts and sms through Qt(C++)
Hi myinjun

If you search through the archives of this mailing list, especially
for posts with my name you will find some stuff on Sailfish and SMS.

I was able to get SMS working

[SailfishDevel] How to get contacts and sms through Qt(C++)

2013-12-21 Thread itviewer
Hi,
I want to manage contacts and sms message through Qt C++,how can i do that?Are 
there any helpful documents? 
Any pointers whatsoever would be highly appreciated.
thanks



maxinjun ___
SailfishOS.org Devel mailing list