Monday, 8 July 2013

How to use iOS DocumentViewer .

// iOS DocumentViewer is very helpful to open .pdf file in appcelerator in iOS.

Prefer below link it gives whole description of iOS DocumentViewer.

// http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS.DocumentViewer

For example, an email program might use this class to allow the user to preview attachments and open them in other apps. Use this class to present an appropriate user interface for previewing or printing a specified file. 

Sample Code  :)

app.js 

var win1 = Titanium.UI.createWindow({
    title : 'win 1',
    backgroundColor : '#fff'
});
var modalWin = Ti.UI.createWindow();

var navmodal = Ti.UI.iPhone.createNavigationGroup({
    window : modalWin
});
win1.add(navmodal);

var b2t = Titanium.UI.createButton({
    title : 'Open PDF'
});
modalWin.RightNavButton = b2t;

var b1t = Titanium.UI.createButton({
    title : 'Share PDF',
    height : 40,
    width : 200,
    top : 270
});
win1.add(b1t);

z = Ti.UI.iOS.createDocumentViewer({
    url : 'GettingStarted.pdf' // Name of PDF file and path is simply in iphone folder
});

b1t.addEventListener('click', function() {
    z.show({
        animated : false,
        view : b2t
    });
});

b2t.addEventListener('click', function() {
    z.show();
});
win1.open();

Snap :)







Wednesday, 3 July 2013

Titanium Mobile Create a Sliding Menu for iOS

// Titanium Mobile Create a Sliding Menu for iOS

In  this link tutorial is available for Sliding Menu, that code is simple code not in Alloy.

http://mobile.tutsplus.com/tutorials/appcelerator/titanium-mobile-create-a-sliding-menu-for-ios/


// I just use same code that give in this tutorial but only difference is my code is in Alloy.

// If any one need that code in alloy that person take code from GIT. :)

// That Alloy Code is available on Git.

Here the Link. :)

https://github.com/dharmik/Sliding-Menu-for-iOS-in-Alloy 

Helpful Link :)

http://mobile.tutsplus.com/ 




(Alloy) Slider Like Facebook working in both android and iOS

// Slider like facebook working in both Android and iOS .

// Code is in alloy .

// Code is working fine in both os.

// Slider is smoothly working.

// Code is available on GIT :)

https://github.com/dharmik/Slider-Like-Facebook-working-in-both-android-and-iOS

Here snap of iPhone simulator. and this slider working fine in android device.

Snap :)




Monday, 1 July 2013

Use Emoji In Appcelerator

// How to use Emoji in appcelerator ?

//It is very easy to create Emoji in appcelerator.

//What is Emoji ?

// ANS : Emoji started in Japan so many of the icons are closely tied to the Japanese culture. Some of them are quite foreign.

//Prefer below link it very helpful to you to understand what is Emoji and how to use it.


http://hasseg.org/blog/post/546/use-unicode-emoji-as-image-free-icons-in-ios-web-apps/ 

http://hasseg.org/blog/post/692/use-unicode-emoji-as-icons-in-native-ios-apps/

Sample code is available on Git.

Here git Link :)

https://github.com/dharmik/Use-Emoji

Snap :)


Friday, 28 June 2013

Use of IPhone URL Schemes

// Here is the example of how to Use of IPhone URL Schemes.

// How to use it ?

// IPhone URL Schemes is very easy and very helpful to use.

// This page centralizes code samples for URL schemes available in many iPhone applications, not only in Apple's but in many others. It also includes programming tips and references about implementing apps registering or consuming URL schemes. 

//Below link is very helpful to developer

 http://wiki.akosma.com/IPhone_URL_Schemes#SMS 

In example we can easily open below iPhone Application

            1)  Open Maps
            2)  Open SMS
            3)  Open Dialer
            4)  Open YouTube

            5)  Open App Store / Market
            6)  Open Skype
            7)  Open Gmail
            8)  Open Safari
            9)  Open Music
          10)  Open iBook


But for that we have application install in iPhone.

Otherwise it can not open.

Test that application in phone not a simulator because in simulator you get less idea compare to phone.

So check it in LIVE DEVICE.

Sample code for how to use  iPhone URL Schemes available on GIT : )

 https://github.com/dharmik/URLSchemes

i) snap :)


                                                       ii) snap :)
                                                                                                              iii) snap :)



Friday, 21 June 2013

Use custom JSON file in ALLOY



// Here is sample code of how to use custom JSON file in alloy

// In this code there is simple map functionality is available in that map all the coordinates like

1) Longitude
2) Latitude
3) Name

All above parameter are coming from Custom JSON file.

So We can easily Create custom json file and also pin it to MAP.

Sample code is available on Git.

Here is LINK :)

https://github.com/dharmik/Custom-JSON-File

Snap-Shot :)

Tuesday, 11 June 2013

Get Profile Detail With The Help Of Gravatar E-mail Address .

// With the help of Gravatar email address you can get its Profile Detail like
  • Name
  • Profile Pic
  • FamilyName
  • FullName
  • Location
 // So no need to take profile detail from user if user have gravatar account. :)

CODE :)
https://github.com/dharmik/Gravatar-ProfileDetails


Helpful Link :) 
https://en.gravatar.com/site/implement/profiles/json/