Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
ankur_siwach
Posts: 142
Registered: ‎09-28-2012
My Device: Blackberry Developer
My Carrier: Aircel
Accepted Solution

how can i wirte the data into temporary file .??

[ Edited ]

hi BBSJdev,

 

how can i wirte the data into  temporary file .??

do u have some sample code ??

 

MOD EDIT: Subject changed to reflect a new topic please see previous topic http://supportforums.blackberry.com/t5/Native-Development/Size-of-my-all-contacts-in-bytes/td-p/2594...

 


----------------------------------------------------------
Feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: how can i wirte the data into temporary file .??

[ Edited ]

Can you confirm my question from earlier?

Are you planning to transport the data somehow, if so which one?

 

If so kill two birds with one stone, write it out in the format you are going to use.

The answer given above will determine the class/api you use.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
ankur_siwach
Posts: 142
Registered: ‎09-28-2012
My Device: Blackberry Developer
My Carrier: Aircel

Re: how can i wirte the data into temporary file .??

[ Edited ]

i don't have any idea how to do that ,

means which api i should use and  in which format i have to store the data...

 


----------------------------------------------------------
Feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: how can i wirte the data into temporary file .??

[ Edited ]

@ankur_siwach I thought you were the original poster I should have checked before answering.

 

So as not to hijack this thread can you post your problem, with exactly what you want to achieve in a new thread.

 

Cheers.

 

[EDIT] Thanks for doing that Steve_t


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: how can i wirte the data into temporary file .??

Okay so what is it you are trying to do, i.e. backup the contacts, share them with others?


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
esam_tec
Posts: 85
Registered: ‎06-22-2013
My Device: N/A
My Carrier: N/A

Re: how can i wirte the data into temporary file .??

QFile file(QDir::currentPath() + "/app/native/assets/YourFile");
if ( file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text))
{
QTextStream stream( &file );
stream << The String That You Want Write;
file.close();
}

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: how can i wirte the data into temporary file .??

@esam_tec LOL, good answer :smileyhappy: but this thread was split from another about saving contacts and so needs some questions answered about what's trying to be achieved first. You weren't to know that though.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
ankur_siwach
Posts: 142
Registered: ‎09-28-2012
My Device: Blackberry Developer
My Carrier: Aircel

Re: how can i wirte the data into temporary file .??

my question was related with that post thats why i post in the middle of that post..

 

my qustion is that i am able to get contacts from the device and i want to find out the size of contacts , as BBSJdev said in that post you can write the contacts in temp file,

 

so i want to know that how can i do that...so i can find out the size of my contacts..


----------------------------------------------------------
Feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: how can i wirte the data into temporary file .??

Yes but your purpose may not be the same as that guys so it's better to split it out rather than confuse the issues that may occur for both of you.

 

For what purpose do you want to get the size, it is a pretty meaningless stat on it's own?

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
ankur_siwach
Posts: 142
Registered: ‎09-28-2012
My Device: Blackberry Developer
My Carrier: Aircel

Re: how can i wirte the data into temporary file .??

i want to show the size of all media,documents and contacts with number of count, same has been done for media and documents getting problem with contacts..


----------------------------------------------------------
Feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Please use plain text.