kandi background
Explore Kits

ThinkAndroid | ThinkAndroid是一个免费的开源的、简易的、遵循Apache2开源协议发布的Android开发框架,其开发宗旨是简单、快速的进行 Android应用程序的开发,包含Android mvc、简易 | Object-Relational Mapping library

 by   white-cat Java Version: Current License: No License

 by   white-cat Java Version: Current License: No License

Download this library from

kandi X-RAY | ThinkAndroid Summary

ThinkAndroid is a Java library typically used in Telecommunications, Media, Telecom, Utilities, Object-Relational Mapping applications. ThinkAndroid has no bugs, it has no vulnerabilities and it has medium support. However ThinkAndroid build file is not available. You can download it from GitHub.
ThinkAndroid是一个免费的开源的、简易的、遵循Apache2开源协议发布的Android开发框架,其开发宗旨是简单、快速的进行 Android应用程序的开发,包含Android mvc、简易sqlite orm、ioc模块、封装Android httpclitent的http模块, 具有快速构建文件缓存功能,无需考虑缓存文件的格式,都可以非常轻松的实现缓存,它还基于文件缓存模块实现了图片缓存功能, 在android中加载的图片的时候,对oom的问题,和对加载图片错位的问题都轻易解决。他还包括了一个手机开发中经常应用的实用工具类, 如日志管理,配置文件管理,android下载器模块,网络切换检测等等工具。.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • ThinkAndroid has a medium active ecosystem.
  • It has 1956 star(s) with 1063 fork(s). There are 236 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 2 open issues and 2 have been closed. On average issues are closed in 453 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of ThinkAndroid is current.
ThinkAndroid Support
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping
ThinkAndroid Support
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping

quality kandi Quality

  • ThinkAndroid has 0 bugs and 0 code smells.
ThinkAndroid Quality
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping
ThinkAndroid Quality
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping

securitySecurity

  • ThinkAndroid has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • ThinkAndroid code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
ThinkAndroid Security
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping
ThinkAndroid Security
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping

license License

  • ThinkAndroid does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.
ThinkAndroid License
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping
ThinkAndroid License
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping

buildReuse

  • ThinkAndroid releases are not available. You will need to build from source code and install.
  • ThinkAndroid has no build file. You will be need to create the build yourself to build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
ThinkAndroid Reuse
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping
ThinkAndroid Reuse
Best in #Object-Relational Mapping
Average in #Object-Relational Mapping
Top functions reviewed by kandi - BETA

kandi has reviewed ThinkAndroid and discovered the below as its top functions. This is intended to give you an instant insight into ThinkAndroid implemented functionality, and help decide if they suit your requirements.

  • validate ID card .
    • Deep - to - string representation of an array of objects .
      • get time state
        • Add a buffer to the cache .
          • Process a TAResponse .
            • Copy data from an InputStream to another file
              • Inject a resource .
                • Creates an async response handler that will handle download requests .
                  • Make a request with retry logic .
                    • Set field value .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      ThinkAndroid Key Features

                      MVC模块:实现视图与模型的分离。

                      ioc模块:android中的ioc模块,完全注解方式就可以进行UI绑定、res中的资源的读取、以及对象的初始化。

                      数据库模块:android中的orm框架,使用了线程池对sqlite进行操作。

                      http模块:通过httpclient进行封装http数据请求,支持异步及同步方式加载。

                      缓存模块:通过简单的配置及设计可以很好的实现缓存,对缓存可以随意的配置

                      图片缓存模块:imageview加载图片的时候无需考虑图片加载过程中出现的oom和android容器快速滑动时候出现的图片错位等现象。

                      配置器模块:可以对简易的实现配对配置的操作,目前配置文件可以支持Preference、Properties对配置进行存取。

                      日志打印模块:可以较快的轻易的是实现日志打印,支持日志打印的扩展,目前支持对sdcard写入本地打印、以及控制台打印

                      下载器模块:可以简单的实现多线程下载、后台下载、断点续传、对下载进行控制、如开始、暂停、删除等等。

                      网络状态检测模块:当网络状态改变时,对其进行检测。

                      ThinkAndroid Examples and Code Snippets

                      See all related Code Snippets

                      使用ThinkAndroid快速开发框架需要有以下权限:

                      copy iconCopydownload iconDownload
                      <!-- 访问互联网权限 根据需要添加-->
                      <uses-permission android:name="android.permission.INTERNET" />
                      <!-- SDCARD读写权限 根据需要添加 -->
                      <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
                      <!-- 网络状态检测权限  根据需要添加-->
                      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
                      <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
                      <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
                      <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
                           配置:
                           <receiver android:name="com.ta.util.netstate.TANetworkStateReceiver" >
                                  <intent-filter>
                                      <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
                                  </intent-filter>
                              </receiver>
                       <application
                              android:name="com.ta.TAApplication" >
                            application必须配置以上格式
                      

                      Activity必须继承TAActivity

                      copy iconCopydownload iconDownload
                        getTAApplication().registerCommand(R.string.comand,
                              TAIdentityCommand.class);
                      		getTAApplication().registerCommand(R.string.comand,
                      				TAIdentityCommand.class);
                      		TALogger.addLogger(new TAPrintToFileLogger());
                      		TARequest request = new TARequest();
                      		doCommand(R.string.comand, request, new TAIResponseListener()
                      		{
                      
                      			@Override
                      			public void onStart(TAResponse response)
                      			{
                      				// TODO Auto-generated method stub
                      
                      			}
                      
                      			@Override
                      			public void onSuccess(TAResponse response)
                      			{
                      				// TODO Auto-generated method stub
                      
                      			}
                      
                      			@Override
                      			public void onRuning(TAResponse response)
                      			{
                      				// TODO Auto-generated method stub
                      
                      			}
                      
                      			@Override
                      			public void onFailure(TAResponse response)
                      			{
                      				// TODO Auto-generated method stub
                      
                      			}
                      
                      		}, false, true, true);
                          
                          
                          
                        
                      package com.ta.mvc.command;
                      
                      import com.ta.mvc.common.TAIResponseListener;
                      import com.ta.mvc.common.TARequest;
                      import com.ta.mvc.common.TAResponse;
                      
                      public class TAIdentityCommand extends TACommand
                      {
                        @Override
                      	protected void executeCommand()
                      	{
                      		// TODO Auto-generated method stub
                      		TARequest request = getRequest();
                      		TAResponse response = new TAResponse();
                      		response.setTag(request.getTag());
                      		response.setData(request.getData());
                      		response.setActivityKey((String) request.getActivityKey());
                      		response.setActivityKeyResID(request.getActivityKeyResID());
                      		setResponse(response);
                      		notifyListener(true);
                      	}
                      
                      	protected void notifyListener(boolean success)
                      	{
                      		TAIResponseListener responseListener = getResponseListener();
                      		if (responseListener != null)
                      		{
                      			onComandUpdate(command_success);
                      		}
                      	}
                      }
                      
                      

                      使用http模块上传文件 或者 提交数据 到服务器(post方法)

                      copy iconCopydownload iconDownload
                      RequestParams params = new RequestParams();
                        	  params.put("username", "white_cat");
                      		  params.put("password", "123456");
                      		  params.put("email", "2640017581@qq.com");
                      		  params.put("profile_picture", new File("/mnt/sdcard/testpic.jpg")); // 上传文件
                      		  params.put("profile_picture2", inputStream); // 上传数据流
                      		  params.put("profile_picture3", new ByteArrayInputStream(bytes)); // 提交字节流
                      		client.post("http://www.thinkandroid.cn/", new AsyncHttpResponseHandler()
                      		{
                      			@Override
                      			public void onSuccess(String content)
                      			{
                      				// TODO Auto-generated method stub
                      				super.onSuccess(content);
                      				TALogger.d(LoginActivity.this, content);
                      			}
                      			
                      			@Override
                      			public void onStart()
                      			{
                      				// TODO Auto-generated method stub
                      				super.onStart();
                      			}
                      			
                      			@Override
                      			public void onFailure(Throwable error)
                      			{
                      				// TODO Auto-generated method stub
                      				super.onFailure(error);
                      			}
                      			
                      			@Override
                      			public void onFinish()
                      			{
                      				// TODO Auto-generated method stub
                      				super.onFinish();
                      			}
                      
                      		});
                      	}
                      

                      配置器模

                      copy iconCopydownload iconDownload
                      	TAIConfig config = application
                      				.getConfig(TAApplication.PROPERTIESCONFIG);
                      		Entity entity = new Entity();
                      		entity.setB(false);
                      		entity.setD(10);
                      		entity.setI(1);
                      		entity.setF(1f);
                      		config.setConfig(entity);
                      		Entity cEntity = config.getConfig(Entity.class);
                      		textView.setText(cEntity.toString());
                      

                      网络状态监测模块

                      copy iconCopydownload iconDownload
                       TANetworkStateReceiver.registerObserver(new TANetChangeObserver()
                      		{
                      			@Override
                      			public void onConnect(netType type)
                      			{
                      				// TODO Auto-generated method stub
                      				super.onConnect(type);
                      				Toast.makeText(TestActivity.this, "onConnect",
                      						Toast.LENGTH_SHORT).show();
                      			}
                      
                      			@Override
                      			public void onDisConnect()
                      			{
                      				// TODO Auto-generated method stub
                      				super.onDisConnect();
                      				Toast.makeText(TestActivity.this, "onDisConnect",
                      						Toast.LENGTH_SHORT).show();
                      			}
                      		});
                      		
                      		
                      		需要开启权限
                      		  <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
                          <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
                          <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
                          <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
                          
                          配置:
                           <receiver android:name="com.ta.util.netstate.TANetworkStateReceiver" >
                                  <intent-filter>
                                      <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
                                  </intent-filter>
                              </receiver>
                      

                      How to pause and play media player when screen is locked or sleeps?

                      copy iconCopydownload iconDownload
                          @Override
                          protected void onPause() {
                              super.onPause();
                      
                              if (myPlayer != null) {
                                  myPlayer.pause();
                              }
                          }
                      
                          @Override
                          protected void onResume() {
                              super.onResume();
                              if (myPlayer != null) {
                                  myPlayer.start();
                              }
                          }
                      

                      See all related Code Snippets

                      Community Discussions

                      Trending Discussions on ThinkAndroid
                      • How to pause and play media player when screen is locked or sleeps?
                      Trending Discussions on ThinkAndroid

                      QUESTION

                      How to pause and play media player when screen is locked or sleeps?

                      Asked 2017-May-30 at 16:11

                      I am using Java and xml to create an application for the summer. This app has music in the background, that I would like to pause and then play depending on the state it is in. When i lock my screen the music does not pause it keeps playing. How would i fix this, I have tried to use the method on this site:

                      https://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents

                      I have not been able to successfully get a working prototype, and I am working in android studio.

                              myPlayer = MediaPlayer.create(c(this is the context), myField(This is the raw file));
                              myPlayer.start();
                              myPlayer.setLooping(true);
                              myPlayer.setVolume(0.7f,0.7f);
                      

                      What could I add to pause the mediaplayer when the lock button is pressed or the phone goes to sleep and then play it when the phone is unlocked?

                      ANSWER

                      Answered 2017-May-30 at 16:11
                          @Override
                          protected void onPause() {
                              super.onPause();
                      
                              if (myPlayer != null) {
                                  myPlayer.pause();
                              }
                          }
                      
                          @Override
                          protected void onResume() {
                              super.onResume();
                              if (myPlayer != null) {
                                  myPlayer.start();
                              }
                          }
                      

                      Source https://stackoverflow.com/questions/44264994

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      No vulnerabilities reported

                      Install ThinkAndroid

                      You can download it from GitHub.
                      You can use ThinkAndroid like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the ThinkAndroid component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

                      Support

                      For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Share this Page

                      share link
                      Consider Popular Object-Relational Mapping Libraries
                      Try Top Libraries by white-cat
                      Compare Object-Relational Mapping Libraries with Highest Support
                      Compare Object-Relational Mapping Libraries with Highest Quality
                      Compare Object-Relational Mapping Libraries with Highest Security
                      Compare Object-Relational Mapping Libraries with Permissive License
                      Compare Object-Relational Mapping Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.