当前位置:  编程技术>移动开发
本页文章导读:
    ▪iteye.com.txt huaweiAt_888 密码见huawei第二笔记簿        iteye.com.txt huaweiAt_888 密码见huawei第二笔记本 iteye.com.txt huaweiAt_888 密码见huawei第二笔记本 ......
    ▪ 判断网络是不是可用        判断网络是否可用 /** * 判断当前网络是否可用 * */ public boolean judgeNetAvailable() { ConnectivityManager manager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE); NetworkInfo networkinfo =.........
    ▪ How to use ZXing(decode qr code)       How to use ZXing(decode qr code) . ZXing for iOS is a sub-project of zxing project partially maintained by independent developers. As of 26th of March 2011, it contains 3 iOS projects:  - BarCodes:  Zxing iOS app. Available on app store.   - Z.........

[1]iteye.com.txt huaweiAt_888 密码见huawei第二笔记簿
    来源: 互联网  发布时间: 2014-02-18
iteye.com.txt huaweiAt_888 密码见huawei第二笔记本
iteye.com.txt huaweiAt_888 密码见huawei第二笔记本

    
[2] 判断网络是不是可用
    来源: 互联网  发布时间: 2014-02-18
判断网络是否可用
	/**
	 * 判断当前网络是否可用
	 * */
	public boolean judgeNetAvailable()
	{

	    ConnectivityManager manager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);   
        
	    NetworkInfo networkinfo = manager.getActiveNetworkInfo(); 
	        
        if (networkinfo == null || !networkinfo.isAvailable()) //网络不可用的情况
        {
        	return false;
        }	
        else
        {
        	return true;
        }
        
	}


startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));//进入网络配置界面
(鲁大)


 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

    
[3] How to use ZXing(decode qr code)
    来源: 互联网  发布时间: 2014-02-18
How to use ZXing(decode qr code) .
ZXing for iOS is a sub-project of zxing project partially maintained by

independent developers. As of 26th of March 2011, it contains 3 iOS projects:

  - BarCodes:  Zxing iOS app. Available on app store.

  - ZXingWidget: a Library that can be included in any iOS app

  - ScanTest: a simple demo app for ZXingWidget





How to include ZXingWidget in a easy and clean way (in XCode4):

====================================================



  1. Locate the "ZXingWidget.xcodeproj" file under "`zxing/iphone/ZXingWidget/`".

Drag ZXingWidget.xcodeproj and drop it onto the root of your Xcode project's "Groups and Files"

sidebar.  A dialog will appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project"

     before clicking "Add". Alternatively you can right-click on you project navigator and select 'Add files to "MyProject"' 



  2. Now you need to link the ZXingWidget static library to your project.  To do that,

      a. select you project file in the project navigator

      b. In the second column, select your _target_ and not the project itself 

      c. Go to the 'build phases' tab, expand the 'link binary with libraries' section,

d. Click the add button A dialog will appear and you should see libZXingWidget.a in the very first

possibilities



  3. Now you need to add ZXingWidget as a dependency of your project, so Xcode compiles it whenever

you compile your project.

    a. like in substep c. of previous step, you nedd to do that in the 'build phases' tab of your target

    b. Expand the 'Target Dependencies' section

    c. Click the add Button and a dialog will appear select ZXingWidget target



4. Headers search path 1: you need to tell your project where to find the ZXingWidget headers.

Select your project in the project navigator, and the select your target and go to the "Build Settings" tab.

Look for "Header Search Paths" and double-click it.

Add the relative path from your project's directory to the "zxing/iphone/ZXingWidget/Classes" directory. Make sure you click the checkbox "recursive path" !





  5. Headers search path 2: You need to add zxing cpp headers to your headers search path,

do this similarly as previous step to point the path to cpp/core/src/ where the 'zxing' directory is.

You don't need to make this search path recursive so do not check the "recursive path" option



6. Import the following iOS frameworks:

   a. AVFoundation

   b. AudioToolbox

   c. CoreVideo

   d. CoreMedia

   e. libiconv

   f. AddressBook

     g. AddressBookUI

   This must be done by adding them in the 'Link Libraries with Binary' just like step 2.c.



  7. You're almost ready to go ..



  8. #import <ZXingWidgetController.h> in a source file



  9. #import <QRCodeReader.h> for example because you will need to inject a barcode reader into ZXingWidgetController.



  10. MAKE SURE the file in which you are using the code deader is a .mm because you are now silently including some c++ code. If you don't do so then

     the compiler may cry as if it does not find some files !



  11. It should work





Known issues for above steps to include:

======================================

  - It can happen that when trying to build your own project with ZXingWidgetController you get linker errors like

    "undefined reference to". If this error looks like a c++ undefined reference, then renaming main.m into main.mm (Objective-C++ source suffix)

    may fix the problem



  - If you have building error like " ... : No such file or directory", then it is a classical error, it means that the path to includes is not well

    specified. The best way to fix this is to look at the Build Command that failed. To do that, click on the lower right corner of your Xcode project,

    you should see the build command that failed. Click on it and expand it by clicking on the "more" symbols that just appeared. This will make appear

    the exact command line instruction that is ran and fails. You can then make sure that the Header search path you specified is there, and you can also

    copy/paste this line into your terminal and try to see if you can reproduce/fix the error by adding the right path to the compiler. Once is is fixed,

    you should have an idea of what's the problem and accordingly modify your Header Search Path.



  - You could have issue of building AdHoc or release build in Xc4 with "No Packager exists for the type of archive" message - see http://stackoverflow.com/questions/5271496/xcode4-ios-4-3-no-packager-exists-for-the-type-of-archive/5322743#5322743







中文说明(针对XCode 4)

1  在"`zxing/iphone/ZXingWidget/`"目录找到"ZXingWidget.xcodeproj" 文件拖到你的项目中,并且不用选择"Copy items"这个选项.选择"Reference Type"为"Relative to Project",然后点击"Add"

2.点击项目中ZXingWidget.xcodeproj的左三角,出现两个文件,其中一个是"libZXingWidget.a",单击它然后在右边的详细查看框里把它的"targget"的选择勾上

3.在"Groups & Files"里有一个"Targets"的东东,点击左边的三角然后选择下面的第一个项目,右键选择"Get Info".在打开的框里选择"General" tab, 添加"Direct Dependencies",点击"+"然后选择"ZXingWidget"->"Add target",把对话框关掉

4.在"Groups&Files"里选择最最上面的一项,然后右键->"Get Info"->"Build" tab

搜索"Header search path",然后在双击它,添加两个完整路径

(1)你的本地路径+"zxing/iphone/ZXingWidget/Classes",记得选择"recursive path"

e.g.我的完整路径是"/Users/easyin/ZXing/iphone/ZXingWidget/Classes"

(2)你的本地路径+"cpp/core/src/",记得不要选择"recursive path"

e.g.我的完整路径是"/Users/easyin/ZXing/cpp/core/src/"



后面跟六步一样就可以了,这个贴子主要是给自己备忘,写得非常不好,路过的高手不要喷,因为我也看不到

以上英语内容为官方文档内容,中文为自己打,如有雷同,说明哥们两英雄所见略同

    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3